You're mixing quotes.
Your string goes from the first " to the second ", meaning that the string only contains "<a id=". The string is followed by the identifier prev, then another string, creating a syntax error.
Change the outer quotes around the string to ', like this:
'<a id="prev" title="Previous Slide">Previous Slide</a><a id="next" title="Next Slide">Next Slide</a>'
your not escaping your quotes best way to fix is to put the append in single quotes
$("#slideshow").append('<a id="prev" title="Previous Slide">Previous Slide</a><a id="next" title="Next Slide">Next Slide</a>');