var qm_slider = new function() {

    this.retargetExternalLinks = function(selector, links) {
		jQuery.each(links, function(i, value) {
			jQuery(selector+' > *:eq('+i+')').data('href',value);
			qm_slider.getAnchors(value).click(function() {
				jQuery(selector).trigger('scrollTo', i);
				return false;
			});
		});
    };
	
	this.moveSiblingsInsideFirstSlide = function(selector) {
		jQuery(selector).closest('.csc-default').siblings().detach().appendTo(selector+' > *:eq(0)');
	}
	
	this.getAnchors = function(href,containerselector) {
		if(typeof containerselector == 'undefined')
			containerselector = '';
/*
		return jQuery.support.hrefNormalized ?
			jQuery(containerselector+"a[href='"+href.replace(/([ #;&,.+*~\':"!^$[\]()=>|\/])/g,'\\$1')+"']") : // Other browsers
			jQuery(containerselector+'"a[href="'+href+'"]'); // IE 6-7
*/
		return jQuery.support.hrefNormalized ?
			jQuery(containerselector + "a[href=\"/" + href.replace(/([ #;&,.+*~\':"!^$[\]()=>|\/])/g,'\\$1') + "\"]") : // Other browsers
			jQuery(containerselector + "a[href=\"/" + href + "\"]"); // IE 6-7			
	}
};

