Index: E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/version.txt
===================================================================
--- E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/version.txt	(revision 0)
+++ E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/version.txt	(revision 9)
@@ -0,0 +1 @@
+version 1.3.4
\ No newline at end of file
Index: E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/template/product/breadcrumbs.php
===================================================================
--- E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/template/product/breadcrumbs.php	(revision 8)
+++ E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/template/product/breadcrumbs.php	(revision 9)
@@ -1,5 +0,0 @@
-<div class="sixteen columns breadcrumb">
-    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
-    	<a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
-    <?php } ?>
-</div>
\ No newline at end of file
Index: E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/template/product/category.tpl
===================================================================
--- E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/template/product/category.tpl	(revision 8)
+++ E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/template/product/category.tpl	(revision 9)
@@ -1,7 +1,11 @@
 <?php echo $header; ?>
 <div class="az-content-bg">
 
-    <?php include('breadcrumbs.php'); ?>
+    <div class="sixteen columns breadcrumb">
+        <?php foreach ($breadcrumbs as $breadcrumb) { ?>
+        <a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
+        <?php } ?>
+    </div>
 
         <div class="twelve columns omega right_column">
           <?php echo $content_top; ?>
Index: E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/template/product/product.tpl
===================================================================
--- E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/template/product/product.tpl	(revision 8)
+++ E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/template/product/product.tpl	(revision 9)
@@ -1,7 +1,12 @@
 <?php echo $header; ?>
 <div>
 <?php echo $content_top; ?>
-<?php include('breadcrumbs.php'); ?>
+
+<div class="sixteen columns breadcrumb">
+    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
+    <a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
+    <?php } ?>
+</div>
 <div class="sixteen columns product-page-content">
 
 <div class="clearfix product-info">
Index: E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/template/product/special.tpl
===================================================================
--- E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/template/product/special.tpl	(revision 8)
+++ E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/template/product/special.tpl	(revision 9)
@@ -1,6 +1,10 @@
 <?php echo $header; ?>
 <div class="display_block">
-    <?php include('breadcrumbs.php'); ?>
+    <div class="sixteen columns breadcrumb">
+        <?php foreach ($breadcrumbs as $breadcrumb) { ?>
+        <a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
+        <?php } ?>
+    </div>
 </div>
 <?php echo $column_left; ?><?php echo $column_right; ?>
 <div id="content"><?php echo $content_top; ?>
Index: E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/template/product/search.tpl
===================================================================
--- E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/template/product/search.tpl	(revision 8)
+++ E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/template/product/search.tpl	(revision 9)
@@ -1,6 +1,11 @@
 <?php echo $header; ?>
 <div class="display_block">
-    <?php include('breadcrumbs.php'); ?>
+
+    <div class="sixteen columns breadcrumb">
+        <?php foreach ($breadcrumbs as $breadcrumb) { ?>
+        <a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
+        <?php } ?>
+    </div>
 </div>
 
 <?php echo $column_left; ?><?php echo $column_right; ?>
Index: E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/js/custom.js
===================================================================
--- E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/js/custom.js	(revision 8)
+++ E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/js/custom.js	(revision 9)
@@ -1,249 +1,249 @@
-jQuery(function() {
-    jQuery("#back-top").css({"bottom":jQuery("#footer").height()+150+"px"});
-
-    jQuery("#back-top").hide();
-    jQuery(window).scroll(function () {
-            if (jQuery(this).scrollTop() > 600) {
-                jQuery('#back-top').fadeIn();
-            } else {
-                jQuery('#back-top').fadeOut();
-            }
-    });
-    jQuery('#back-top a').click(function () {
-            jQuery('body,html').animate({
-                scrollTop: 0
-            }, 400);
-            return false;
-    });
-
-
-    jQuery('#back-top a').hover(function() {
-            jQuery(this).stop().animate({opacity:1.0},500);
-        },
-        function() {
-            jQuery(this).stop().animate({opacity:0.4},500);
-    });
-
-
-    jQuery(".shopping_cart a.open #cart-total").live('click',function() {
-        jQuery("#header #cart .content").fadeToggle(300, "linear");
-    });
-
-
-
-
-    jQuery(".product").hover(function() {
-        jQuery(this).find(".roll_over_img").fadeToggle("fast", "linear");
-        jQuery(this).find(".product-image-wrapper-hover").fadeToggle("fast", "linear");
-    });
-
-    jQuery(".product-list-wrapper").hover(function() {
-        jQuery(this).find(".roll_over_img").fadeToggle("fast", "linear");
-    });
-
-
-    jQuery(".product").hover(function() {
-        jQuery(this).find(".wrapper-hover").animate({ backgroundColor: "#444444" }, 500);
-    },function() {
-        jQuery(this).find(".wrapper-hover").animate({ backgroundColor: "#fff" }, 500);
-    });
-
-    jQuery(".product").hover(function() {
-        jQuery(this).find(".wrapper-hover-hidden ").fadeToggle(500, "linear");
-    });
-
-    jQuery(".product").hover(function() {
-        jQuery(this).find(".wrapper-hover span").animate({color:"#fff"}, 500);
-        jQuery(this).find(".wrapper-hover a").animate({color:"#fff"}, 500);
-    },function() {
-        jQuery(this).find(".wrapper-hover span").animate({color:"#000"}, 500);
-        jQuery(this).find(".wrapper-hover a").animate({color:"#000"}, 500);
-    });
-
-
-
-
-    jQuery('#footer_button').click(function() {
-        jQuery('#footer_higher_content').slideToggle(500);
-        jQuery('#footer_button').toggleClass('footer_button_up');
-    });
-
-
-    jQuery('#nav_block_head').click(function() {
-        jQuery('.nav_block_dropdown').toggleClass('visible_on');
-    });
-
-
-    jQuery('#menu_block_head').click(function() {
-        jQuery('.menu_block_dropdown').toggleClass('visible_on');
-    });
-
-    jQuery("#select1").selectbox();
-    jQuery("#select2").selectbox();
-    jQuery("#select3").selectbox();
-
-
-
-
-
-    jQuery('#mycarousel').jcarousel({
-            vertical: true,
-            scroll: 1,
-            auto: 3,
-            wrap: 'circular',
-            animation: 1000,
-            easing: 'linear'
-    });
-
-
-
-    //slider switch
-    set_reset_tab=function (tab) {
-        jQuery('#bestsellers_activate, #specials_activate, #newproducts_activate').removeClass('active_slider');
-        tab.addClass('active_slider');
-    };
-
-    if(!jQuery('#newproducts_slider').length) {
-        jQuery(".tabs div:eq(0)").remove();
-    };
-    if(!jQuery('#specials_slider').length) {
-        jQuery("#specials_activate").parent().remove();
-    };
-    if(!jQuery('#bestsellers_slider').length) {
-        jQuery("#bestsellers_activate").parent().remove();
-    };
-
-    jQuery('.tabs > div:first a').addClass('active_slider');
-    jQuery(".sixteen.columns.alpha div:first").show();
-
-    jQuery('#bestsellers_activate').click(function() {
-        jQuery('#bestsellers_slider').show();
-        jQuery('#newproducts_slider').hide();
-        jQuery('#specials_slider').hide();
-        set_reset_tab(jQuery(this));
-    });
-    jQuery('#specials_activate').click(function() {
-        jQuery('#specials_slider').show();
-        jQuery('#newproducts_slider').hide();
-        jQuery('#bestsellers_slider').hide();
-        set_reset_tab(jQuery(this));
-    });
-
-    jQuery('#newproducts_activate').click(function() {
-        jQuery('#newproducts_slider').show();
-        jQuery('#bestsellers_slider').hide();
-        jQuery('#specials_slider').hide();
-        set_reset_tab(jQuery(this));
-    });
-
-    jQuery('#carousel_bestsellers').elastislide({
-        easing		: 'easeInOutQuad',
-        speed		: 1200
-    });
-    jQuery('#carousel_specials').elastislide({
-        easing		: 'easeInOutQuad',
-        speed		: 1200
-    });
-    jQuery('#carousel_newproducts').elastislide({
-        easing		: 'easeInOutQuad',
-        speed		: 1200,
-
-    });
-    //end slider switch
-
-    //product page counter
-    var old_q;
-    old_q=parseFloat(jQuery('#qty').val());
-    jQuery('.marker_qty_right').click(function(){
-        jQuery('#qty').val(++old_q);
-    });
-    jQuery('.marker_qty_left').click(function(){
-        if(old_q<2)old_q=1;
-        jQuery('#qty').val(--old_q);
-    });
-    //end product page counter
-
-    /*
-    jQuery("iframe").each(function(){
-        var ifr_source = jQuery(this).attr('src');
-        var wmode = "wmode=transparent";
-        if(ifr_source.indexOf('?') != -1) {
-            var getQString = ifr_source.split('?');
-            var oldString = getQString[1];
-            var newString = getQString[0];
-            jQuery(this).attr('src',newString+'?'+wmode+'&'+oldString);
-        }
-        else jQuery(this).attr('src',ifr_source+'?'+wmode);
-    });
-     */
-
-    /* tag cloud */
-    $('ul#jcloud-tags').jcloud({
-        radius:80,          /*    cloud radius */
-        size:30,             /*    tags font size  */
-        step:2,              /*    cloud step  */
-        speed:50,            /*    cloud speed  */
-        //start_speed:30,
-        flats:3,             /*    flats count */
-        clock:90,            /*    timer interval */
-        areal:80,           /*    cloud areal  */
-        splitX:1,          /*    X-axis delta */
-        splitY:1,          /*    Y-axis delta  */
-        colors:['#000000','#000000','#000000','#000000','#000000','#000000']
-    });
-
-});
-
-function browserDetectNav(chrAfterPoint) {
-    var
-        UA=window.navigator.userAgent,
-        OperaB = /Opera[ \/]+\w+\.\w+/i,
-        OperaV = /Version[ \/]+\w+\.\w+/i,
-        FirefoxB = /Firefox\/\w+\.\w+/i,
-        ChromeB = /Chrome\/\w+\.\w+/i,
-        SafariB = /Version\/\w+\.\w+/i,
-        IEB = /MSIE *\d+\.\w+/i,
-        SafariV = /Safari\/\w+\.\w+/i,
-        browser = new Array(),
-        browserSplit = /[ \/\.]/i,
-        OperaV = UA.match(OperaV),
-        Firefox = UA.match(FirefoxB),
-        Chrome = UA.match(ChromeB),
-        Safari = UA.match(SafariB),
-        SafariV = UA.match(SafariV),
-        IE = UA.match(IEB),
-        Opera = UA.match(OperaB);
-
-    if ((!Opera=="")&(!OperaV=="")) browser[0]=OperaV[0].replace(/Version/, "Opera")
-    else
-    if (!Opera=="")	browser[0]=Opera[0]
-    else
-    if (!IE=="") browser[0] = IE[0]
-    else
-    if (!Firefox=="") browser[0]=Firefox[0]
-    else
-    if (!Chrome=="") browser[0] = Chrome[0]
-    else
-    if ((!Safari=="")&&(!SafariV=="")) browser[0] = Safari[0].replace("Version", "Safari");
-
-    var  outputData;
-    if (browser[0] != null) outputData = browser[0].split(browserSplit);
-    if ((chrAfterPoint==null)&&(outputData != null)) {
-        chrAfterPoint=outputData[2].length;
-        outputData[2] = outputData[2].substring(0, chrAfterPoint);
-        return(outputData);
-    }
-    else return(false);
-}
-
-jQuery(window).load(function() {
-    var data = browserDetectNav();
-    /*alert("browser: "+data[0]+", version: "+data[1]+"."+data[2]);*/
-    if (data[0] == 'Safari') {
-        /*alert("browser: "+data[0]);*/
-        jQuery("#menu > ul > li > div.with_descr").css("width", "32em");
-    }
-
-});
-
-
+jQuery(function() {
+    jQuery("#back-top").css({"bottom":jQuery("#footer").height()+150+"px"});
+
+    jQuery("#back-top").hide();
+    jQuery(window).scroll(function () {
+            if (jQuery(this).scrollTop() > 600) {
+                jQuery('#back-top').fadeIn();
+            } else {
+                jQuery('#back-top').fadeOut();
+            }
+    });
+    jQuery('#back-top a').click(function () {
+            jQuery('body,html').animate({
+                scrollTop: 0
+            }, 400);
+            return false;
+    });
+
+
+    jQuery('#back-top a').hover(function() {
+            jQuery(this).stop().animate({opacity:1.0},500);
+        },
+        function() {
+            jQuery(this).stop().animate({opacity:0.4},500);
+    });
+
+
+    jQuery(".shopping_cart a.open #cart-total").live('click',function() {
+        jQuery("#header #cart .content").fadeToggle(300, "linear");
+    });
+
+
+
+
+    jQuery(".product").hover(function() {
+        jQuery(this).find(".roll_over_img").fadeToggle("fast", "linear");
+        jQuery(this).find(".product-image-wrapper-hover").fadeToggle("fast", "linear");
+    });
+
+    jQuery(".product-list-wrapper").hover(function() {
+        jQuery(this).find(".roll_over_img").fadeToggle("fast", "linear");
+    });
+
+
+    jQuery(".product").hover(function() {
+        jQuery(this).find(".wrapper-hover").animate({ backgroundColor: "#444444" }, 500);
+    },function() {
+        jQuery(this).find(".wrapper-hover").animate({ backgroundColor: "#fff" }, 500);
+    });
+
+    jQuery(".product").hover(function() {
+        jQuery(this).find(".wrapper-hover-hidden ").fadeToggle(500, "linear");
+    });
+
+    jQuery(".product").hover(function() {
+        jQuery(this).find(".wrapper-hover span").animate({color:"#fff"}, 500);
+        jQuery(this).find(".wrapper-hover a").animate({color:"#fff"}, 500);
+    },function() {
+        jQuery(this).find(".wrapper-hover span").animate({color:"#000"}, 500);
+        jQuery(this).find(".wrapper-hover a").animate({color:"#000"}, 500);
+    });
+
+
+
+
+    jQuery('#footer_button').click(function() {
+        jQuery('#footer_higher_content').slideToggle(500);
+        jQuery('#footer_button').toggleClass('footer_button_up');
+    });
+
+
+    jQuery('#nav_block_head').click(function() {
+        jQuery('.nav_block_dropdown').toggleClass('visible_on');
+    });
+
+
+    jQuery('#menu_block_head').click(function() {
+        jQuery('.menu_block_dropdown').toggleClass('visible_on');
+    });
+
+    jQuery("#select1").selectbox();
+    jQuery("#select2").selectbox();
+    jQuery("#select3").selectbox();
+
+
+
+
+
+    jQuery('#mycarousel').jcarousel({
+            vertical: true,
+            scroll: 1,
+            auto: 3,
+            wrap: 'circular',
+            animation: 1000,
+            easing: 'linear'
+    });
+
+
+
+    //slider switch
+    set_reset_tab=function (tab) {
+        jQuery('#bestsellers_activate, #specials_activate, #newproducts_activate').removeClass('active_slider');
+        tab.addClass('active_slider');
+    };
+
+    if(!jQuery('#newproducts_slider').length) {
+        jQuery(".tabs div:eq(0)").remove();
+    };
+    if(!jQuery('#specials_slider').length) {
+        jQuery("#specials_activate").parent().remove();
+    };
+    if(!jQuery('#bestsellers_slider').length) {
+        jQuery("#bestsellers_activate").parent().remove();
+    };
+
+    jQuery('.tabs > div:first a').addClass('active_slider');
+    jQuery(".sixteen.columns.alpha div:first").show();
+
+    jQuery('#bestsellers_activate').click(function() {
+        jQuery('#bestsellers_slider').show();
+        jQuery('#newproducts_slider').hide();
+        jQuery('#specials_slider').hide();
+        set_reset_tab(jQuery(this));
+    });
+    jQuery('#specials_activate').click(function() {
+        jQuery('#specials_slider').show();
+        jQuery('#newproducts_slider').hide();
+        jQuery('#bestsellers_slider').hide();
+        set_reset_tab(jQuery(this));
+    });
+
+    jQuery('#newproducts_activate').click(function() {
+        jQuery('#newproducts_slider').show();
+        jQuery('#bestsellers_slider').hide();
+        jQuery('#specials_slider').hide();
+        set_reset_tab(jQuery(this));
+    });
+
+    jQuery('#carousel_bestsellers').elastislide({
+        easing		: 'easeInOutQuad',
+        speed		: 1200
+    });
+    jQuery('#carousel_specials').elastislide({
+        easing		: 'easeInOutQuad',
+        speed		: 1200
+    });
+    jQuery('#carousel_newproducts').elastislide({
+        easing		: 'easeInOutQuad',
+        speed		: 1200,
+
+    });
+    //end slider switch
+
+    //product page counter
+    var old_q;
+    old_q=parseFloat(jQuery('#qty').val());
+    jQuery('.marker_qty_right').click(function(){
+        jQuery('#qty').val(++old_q);
+    });
+    jQuery('.marker_qty_left').click(function(){
+        if(old_q<2)old_q=1;
+        jQuery('#qty').val(--old_q);
+    });
+    //end product page counter
+
+    /*
+    jQuery("iframe").each(function(){
+        var ifr_source = jQuery(this).attr('src');
+        var wmode = "wmode=transparent";
+        if(ifr_source.indexOf('?') != -1) {
+            var getQString = ifr_source.split('?');
+            var oldString = getQString[1];
+            var newString = getQString[0];
+            jQuery(this).attr('src',newString+'?'+wmode+'&'+oldString);
+        }
+        else jQuery(this).attr('src',ifr_source+'?'+wmode);
+    });
+     */
+
+    /* tag cloud */
+    $('ul#jcloud-tags').jcloud({
+        radius:80,          /*    cloud radius */
+        size:30,             /*    tags font size  */
+        step:2,              /*    cloud step  */
+        speed:50,            /*    cloud speed  */
+        //start_speed:30,
+        flats:3,             /*    flats count */
+        clock:90,            /*    timer interval */
+        areal:80,           /*    cloud areal  */
+        splitX:1,          /*    X-axis delta */
+        splitY:1,          /*    Y-axis delta  */
+        colors:['#000000','#000000','#000000','#000000','#000000','#000000']
+    });
+
+});
+
+function browserDetectNav(chrAfterPoint) {
+    var
+        UA=window.navigator.userAgent,
+        OperaB = /Opera[ \/]+\w+\.\w+/i,
+        OperaV = /Version[ \/]+\w+\.\w+/i,
+        FirefoxB = /Firefox\/\w+\.\w+/i,
+        ChromeB = /Chrome\/\w+\.\w+/i,
+        SafariB = /Version\/\w+\.\w+/i,
+        IEB = /MSIE *\d+\.\w+/i,
+        SafariV = /Safari\/\w+\.\w+/i,
+        browser = new Array(),
+        browserSplit = /[ \/\.]/i,
+        OperaV = UA.match(OperaV),
+        Firefox = UA.match(FirefoxB),
+        Chrome = UA.match(ChromeB),
+        Safari = UA.match(SafariB),
+        SafariV = UA.match(SafariV),
+        IE = UA.match(IEB),
+        Opera = UA.match(OperaB);
+
+    if ((!Opera=="")&(!OperaV=="")) browser[0]=OperaV[0].replace(/Version/, "Opera")
+    else
+    if (!Opera=="")	browser[0]=Opera[0]
+    else
+    if (!IE=="") browser[0] = IE[0]
+    else
+    if (!Firefox=="") browser[0]=Firefox[0]
+    else
+    if (!Chrome=="") browser[0] = Chrome[0]
+    else
+    if ((!Safari=="")&&(!SafariV=="")) browser[0] = Safari[0].replace("Version", "Safari");
+
+    var  outputData;
+    if (browser[0] != null) outputData = browser[0].split(browserSplit);
+    if ((chrAfterPoint==null)&&(outputData != null)) {
+        chrAfterPoint=outputData[2].length;
+        outputData[2] = outputData[2].substring(0, chrAfterPoint);
+        return(outputData);
+    }
+    else return(false);
+}
+
+jQuery(window).load(function() {
+    var data = browserDetectNav();
+    /*alert("browser: "+data[0]+", version: "+data[1]+"."+data[2]);*/
+    if (data[0] == 'Safari') {
+        /*alert("browser: "+data[0]);*/
+        jQuery("#menu > ul > li > div.with_descr").css("width", "32em");
+    }
+
+});
+
+
Index: E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/js/banner_scripts.js
===================================================================
--- E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/js/banner_scripts.js	(revision 8)
+++ E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/js/banner_scripts.js	(revision 9)
@@ -1,77 +1,77 @@
-function TopSlider(){
-    var k1=0.5;
-    var k2=0.6;
-    var w0=jQuery(window).width();
-    if(w0 > 1600) { k2=0.55}
-    var w2= w0*k1;
-    var w1= w0*k2;
-    var w3= (w0-jQuery(".container").width())*0.5;
-    var h1=w2/1.9;
-
-    if(h1 < 235) {h1=235;}
-    jQuery("#slider_top").css({"height":h1+"px"});
-    jQuery("#slider_top").css({"width":w0+"px"});
-    jQuery("#carousel1 li").css({"width":w0+"px"});
-    jQuery(".overlap_widget_wrapper").css({"width":w0+"px"});
-    jQuery("#slider_top a.callbacks_nav.next").css({"right":w3+"px","top":h1*0.5-jQuery("#slider_top a.callbacks_nav.next").height()*0.5+"px"});
-    jQuery("#slider_top a.callbacks_nav.prev").css({"left":w3+"px","top":h1*0.5-jQuery("#slider_top a.callbacks_nav.next").height()*0.5+"px"});
-    jQuery("#carousel1 .overlap_widget_wrapper .left_image .title").css({"left":w3+"px"});
-    jQuery("#carousel1 .overlap_widget_wrapper .right_image .title").css({"right":w3+"px"});
-    jQuery(".overlap_widget_wrapper .left_image").css({"width":w1+"px"});
-    jQuery(".overlap_widget_wrapper .left_image .placeholder").css({"width":w2+"px"});
-    jQuery(".overlap_widget_wrapper .right_image").css({"width":w1+"px"});
-    jQuery(".overlap_widget_wrapper .right_image .placeholder").css({"width":w2+"px"});
-    jQuery("#back-top").css({"bottom":jQuery("#footer").height()+150+"px"});
-
-    var is_open = false;
-    var z_index = 0;
-
-    jQuery(".placeholder").mouseenter(function(){
-        is_open = true;
-        jQuery(this).parent().css({"zIndex":"999"});
-        jQuery(this).stop().animate({
-            "width":w1+"px"
-        }, 550, 'easeOutQuad');
-
-    });
-
-    jQuery(".placeholder").mouseleave(function(){
-        is_open = false;
-        z_index++;
-        jQuery(this).parent().css({"zIndex":z_index});
-        jQuery(this).stop().animate({
-            "width":w2+"px"
-        }, 550, 'easeOutQuad');
-    });
-
-};
-
-
-
-jQuery(function() {
-    jQuery('#slider_top a.callbacks_nav').hover(function() {
-            jQuery(this).stop().animate({opacity:1.0},500);
-        },
-        function() {
-            jQuery(this).stop().animate({opacity:0.6},500);
-    });
-
-
-
-    jQuery("#carousel1").responsiveSlides({
-        pager: false,
-        nav: true,
-        speed: 1000,
-        auto: true,
-        timeout: 3600,
-        namespace: "callbacks"
-    });
-    jQuery('#carousel').elastislide({
-        easing		: 'easeInOutQuad',
-        speed		: 1200
-    });
-
-
-});
-
-
+function TopSlider(){
+    var k1=0.5;
+    var k2=0.6;
+    var w0=jQuery(window).width();
+    if(w0 > 1600) { k2=0.55}
+    var w2= w0*k1;
+    var w1= w0*k2;
+    var w3= (w0-jQuery(".container").width())*0.5;
+    var h1=w2/1.9;
+
+    if(h1 < 235) {h1=235;}
+    jQuery("#slider_top").css({"height":h1+"px"});
+    jQuery("#slider_top").css({"width":w0+"px"});
+    jQuery("#carousel1 li").css({"width":w0+"px"});
+    jQuery(".overlap_widget_wrapper").css({"width":w0+"px"});
+    jQuery("#slider_top a.callbacks_nav.next").css({"right":w3+"px","top":h1*0.5-jQuery("#slider_top a.callbacks_nav.next").height()*0.5+"px"});
+    jQuery("#slider_top a.callbacks_nav.prev").css({"left":w3+"px","top":h1*0.5-jQuery("#slider_top a.callbacks_nav.next").height()*0.5+"px"});
+    jQuery("#carousel1 .overlap_widget_wrapper .left_image .title").css({"left":w3+"px"});
+    jQuery("#carousel1 .overlap_widget_wrapper .right_image .title").css({"right":w3+"px"});
+    jQuery(".overlap_widget_wrapper .left_image").css({"width":w1+"px"});
+    jQuery(".overlap_widget_wrapper .left_image .placeholder").css({"width":w2+"px"});
+    jQuery(".overlap_widget_wrapper .right_image").css({"width":w1+"px"});
+    jQuery(".overlap_widget_wrapper .right_image .placeholder").css({"width":w2+"px"});
+    jQuery("#back-top").css({"bottom":jQuery("#footer").height()+150+"px"});
+
+    var is_open = false;
+    var z_index = 0;
+
+    jQuery(".placeholder").mouseenter(function(){
+        is_open = true;
+        jQuery(this).parent().css({"zIndex":"999"});
+        jQuery(this).stop().animate({
+            "width":w1+"px"
+        }, 550, 'easeOutQuad');
+
+    });
+
+    jQuery(".placeholder").mouseleave(function(){
+        is_open = false;
+        z_index++;
+        jQuery(this).parent().css({"zIndex":z_index});
+        jQuery(this).stop().animate({
+            "width":w2+"px"
+        }, 550, 'easeOutQuad');
+    });
+
+};
+
+
+
+jQuery(function() {
+    jQuery('#slider_top a.callbacks_nav').hover(function() {
+            jQuery(this).stop().animate({opacity:1.0},500);
+        },
+        function() {
+            jQuery(this).stop().animate({opacity:0.6},500);
+    });
+
+
+
+    jQuery("#carousel1").responsiveSlides({
+        pager: false,
+        nav: true,
+        speed: 1000,
+        auto: true,
+        timeout: 3600,
+        namespace: "callbacks"
+    });
+    jQuery('#carousel').elastislide({
+        easing		: 'easeInOutQuad',
+        speed		: 1200
+    });
+
+
+});
+
+
Index: E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/js/jquery.elastislide.js
===================================================================
--- E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/js/jquery.elastislide.js	(revision 8)
+++ E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/js/jquery.elastislide.js	(revision 9)
@@ -1,877 +1,877 @@
-(function( window, $, undefined ) {
-
-	
-
-	// http://www.netcu.de/jquery-touchwipe-iphone-ipad-library
-
-	$.fn.touchwipe 				= function(settings) {
-
-		
-
-		var config = {
-
-			min_move_x: 20,
-
-			min_move_y: 20,
-
-			wipeLeft: function() { },
-
-			wipeRight: function() { },
-
-			wipeUp: function() { },
-
-			wipeDown: function() { },
-
-			preventDefaultEvents: true
-
-		};
-
-     
-
-		if (settings) $.extend(config, settings);
-
- 
-
-		this.each(function() {
-
-			var startX;
-
-			var startY;
-
-			var isMoving = false;
-
-
-
-			function cancelTouch() {
-
-				this.removeEventListener('touchmove', onTouchMove);
-
-				startX = null;
-
-				isMoving = false;
-
-			}	
-
-		 
-
-			function onTouchMove(e) {
-
-				if(config.preventDefaultEvents) {
-
-					e.preventDefault();
-
-				}
-
-				if(isMoving) {
-
-					var x = e.touches[0].pageX;
-
-					var y = e.touches[0].pageY;
-
-					var dx = startX - x;
-
-					var dy = startY - y;
-
-					if(Math.abs(dx) >= config.min_move_x) {
-
-						cancelTouch();
-
-						if(dx > 0) {
-
-							config.wipeLeft();
-
-						}
-
-						else {
-
-							config.wipeRight();
-
-						}
-
-					}
-
-					else if(Math.abs(dy) >= config.min_move_y) {
-
-						cancelTouch();
-
-						if(dy > 0) {
-
-							config.wipeDown();
-
-						}
-
-						else {
-
-							config.wipeUp();
-
-						}
-
-					}
-
-				}
-
-			}
-
-		 
-
-			function onTouchStart(e)
-
-			{
-
-				if (e.touches.length == 1) {
-
-					startX = e.touches[0].pageX;
-
-					startY = e.touches[0].pageY;
-
-					isMoving = true;
-
-					this.addEventListener('touchmove', onTouchMove, false);
-
-				}
-
-			}    	 
-
-			if ('ontouchstart' in document.documentElement) {
-
-				this.addEventListener('touchstart', onTouchStart, false);
-
-			}
-
-		});
-
- 
-
-		return this;
-
-	};
-
-	
-
-	$.elastislide 				= function( options, element ) {
-
-		this.$el	= $( element );
-
-		this._init( options );
-
-	};
-
-	
-
-	$.elastislide.defaults 		= {
-
-		speed		: 1000,	// animation speed
-
-		easing		: '',	// animation easing effect
-
-		imageW		: 'auto',	// the images width
-
-		margin		: 0,	// image margin right
-
-		border		: 0,	// image border
-
-		minItems	: 1,	// the minimum number of items to show. 
-
-							// when we resize the window, this will make sure minItems are always shown 
-
-							// (unless of course minItems is higher than the total number of elements)
-
-		current		: 0	// index of the current item
-
-							// when we resize the window, the carousel will make sure this item is visible 
-
-		//onClick		: function() { return true; } // click item callback
-
-    };
-
-	
-
-	$.elastislide.prototype 	= {
-
-		_init 				: function( options ) {
-
-			
-
-			this.options 		= $.extend( true, {}, $.elastislide.defaults, options );
-
-			
-
-			// <ul>
-
-			this.$slider		= this.$el.find('ul');
-
-			
-
-			// <li>
-
-			this.$items			= this.$slider.children('li');
-
-			
-
-			// total number of elements / images
-
-			this.itemsCount		= this.$items.length;
-
-			
-
-			// cache the <ul>'s parent, since we will eventually need to recalculate its width on window resize
-
-			this.$esCarousel	= this.$slider.parent();
-
-			
-
-			// validate options
-
-			this._validateOptions();
-
-			
-
-			// set sizes and initialize some vars...
-
-			this._configure();
-
-			
-
-			// add navigation buttons
-
-			this._addControls();
-
-			
-
-			// initialize the events
-
-			this._initEvents();
-
-			
-
-			// show the <ul>
-
-			this.$slider.show();
-
-			
-
-			// slide to current's position
-
-			this._slideToCurrent( false );
-
-			
-
-		},
-
-		_validateOptions	: function() {
-
-		
-
-			if( this.options.speed < 0 )
-
-				this.options.speed = 450;
-
-			if( this.options.margin < 0 )
-
-				this.options.margin = 4;
-
-			if( this.options.border < 0 )
-
-				this.options.border = 1;
-
-			if( this.options.minItems < 1 || this.options.minItems > this.itemsCount )
-
-				this.options.minItems = 1;
-
-			if( this.options.current > this.itemsCount - 1 )
-
-				this.options.current = 0;
-
-				
-
-		},
-
-		_configure			: function() {
-
-			
-
-			// current item's index
-
-			this.current		= this.options.current;
-
-			
-
-			// the ul's parent's (div.es-carousel) width is the "visible" width
-
-			this.visibleWidth	= this.$esCarousel.width();
-
-			
-
-			// test to see if we need to initially resize the items
-
-			if( this.visibleWidth < this.options.minItems * ( this.options.imageW + 2 * this.options.border ) + ( this.options.minItems - 1 ) * this.options.margin ) {
-
-				this._setDim( ( this.visibleWidth - ( this.options.minItems - 1 ) * this.options.margin ) / this.options.minItems );
-
-				this._setCurrentValues();
-
-				// how many items fit with the current width
-
-				this.fitCount	= this.options.minItems;
-
-			}
-
-			else {
-
-				this._setDim();
-
-				this._setCurrentValues();
-
-			}
-
-			
-
-			// set the <ul> width
-
-			this.$slider.css({
-
-				width	: this.sliderW
-
-			});
-
-			
-
-		},
-
-		_setDim				: function( elW ) {
-
-			
-
-			// <li> style
-
-			this.$items.css({
-
-				//marginRight	: this.options.margin,
-
-				width		: ( elW ) ? elW : this.options.imageW + 2 * this.options.border
-
-			}).children('a').css({ // <a> style
-
-				borderWidth		: this.options.border
-
-			});
-
-			
-
-		},
-
-		_setCurrentValues	: function() {
-
-			
-
-			// the total space occupied by one item
-
-			this.itemW			= this.$items.outerWidth(true);
-
-			
-
-			// total width of the slider / <ul>
-
-			// this will eventually change on window resize
-
-			this.sliderW		= this.itemW * this.itemsCount;
-
-			
-
-			// the ul parent's (div.es-carousel) width is the "visible" width
-
-			this.visibleWidth	= this.$esCarousel.width();
-
-			
-
-			// how many items fit with the current width
-
-			this.fitCount		= Math.floor( this.visibleWidth / this.itemW );
-
-			
-
-		},
-
-		_addControls		: function() {
-
-			
-
-			this.$navNext	= $('<span class="es-nav-next">Next</span>');
-
-			this.$navPrev	= $('<span class="es-nav-prev">Previous</span>');
-
-			$('<div class="es-nav"/>')
-
-			.append( this.$navPrev )
-
-			.append( this.$navNext )
-
-			.appendTo( this.$el );
-
-			
-
-			//this._toggleControls();
-
-				
-
-		},
-
-		_toggleControls		: function( dir, status ) {
-
-			
-
-			// show / hide navigation buttons
-
-			if( dir && status ) {
-
-				if( status === 1 )
-
-					( dir === 'right' ) ? this.$navNext.css({"cursor":"pointer", "opacity":"1"}) : this.$navPrev.css({"cursor":"pointer", "opacity":"1"});
-
-				else
-
-					( dir === 'right' ) ? this.$navNext.css({"cursor":"auto", "opacity":"0.2"}) : this.$navPrev.css({"cursor":"auto", "opacity":"0.2"});
-
-			}
-
-			else if( this.current === this.itemsCount - 1 || this.fitCount >= this.itemsCount )
-
-					this.$navNext.css({"cursor":"auto"});
-
-					TopSlider();
-
-			
-
-		},
-
-		_initEvents			: function() {
-
-			
-
-			var instance	= this;
-
-			
-
-			// window resize
-
-			$(window).bind('resize.elastislide', function( event ) {
-
-				
-
-				// set values again
-
-				instance._setCurrentValues();
-
-				
-
-				// need to resize items
-
-				if( instance.visibleWidth < instance.options.minItems * ( instance.options.imageW + 2 * instance.options.border ) + ( instance.options.minItems - 1 ) * instance.options.margin ) {
-
-					instance._setDim( ( instance.visibleWidth - ( instance.options.minItems - 1 ) * instance.options.margin ) / instance.options.minItems );
-
-					instance._setCurrentValues();
-
-					instance.fitCount	= instance.options.minItems;
-
-				}	
-
-				else{
-
-					instance._setDim();
-
-					instance._setCurrentValues();
-
-				}
-
-				
-
-				instance.$slider.css({
-
-					width	: instance.sliderW + 10 // TODO: +10px seems to solve a firefox "bug" :S
-
-				});
-
-						
-
-				// slide to the current element
-
-				clearTimeout( instance.resetTimeout );
-
-				instance.resetTimeout	= setTimeout(function() {
-
-					instance._slideToCurrent();
-
-				}, 200);
-
-				
-
-			});
-
-			
-
-			// navigation buttons events
-
-			this.$navNext.bind('click.elastislide', function( event ) {
-
-				instance._slide('right');
-
-			});
-
-			
-
-			this.$navPrev.bind('click.elastislide', function( event ) {
-
-				instance._slide('left');
-
-			});
-
-			
-
-			// item click event
-
-			//this.$items.bind('click.elastislide', function( event ) {
-
-				//instance.options.onClick( $(this) );
-
-				//return true;
-
-			//});
-
-			
-
-			// touch events
-
-			instance.$slider.touchwipe({
-
-				wipeLeft			: function() {
-
-					instance._slide('right');
-
-				},
-
-				wipeRight			: function() {
-
-					instance._slide('left');
-
-				}
-
-			});
-
-			
-
-		},
-
-		_slide				: function( dir, val, anim, callback ) {
-
-			
-
-			// if animating return
-
-			if( this.$slider.is(':animated') )
-
-				return false;
-
-			
-
-			// current margin left
-
-			var ml		= parseFloat( this.$slider.css('margin-left') );
-
-			
-
-			// val is just passed when we want an exact value for the margin left (used in the _slideToCurrent function)
-
-			if( val === undefined ) {
-
-			
-
-				// how much to slide?
-
-				var amount	= this.fitCount * this.itemW, val;
-
-				
-
-				if( amount < 0 ) return false;
-
-				
-
-				// make sure not to leave a space between the last item / first item and the end / beggining of the slider available width
-
-				if( dir === 'right' && this.sliderW - ( Math.abs( ml ) + amount ) < this.visibleWidth ) {
-
-					amount	= this.sliderW - ( Math.abs( ml ) + this.visibleWidth ) - this.options.margin; // decrease the margin left
-
-					// show / hide navigation buttons
-
-					this._toggleControls( 'right', -1 );
-
-					this._toggleControls( 'left', 1 );
-
-				}
-
-				else if( dir === 'left' && Math.abs( ml ) - amount < 0 ) {				
-
-					amount	= Math.abs( ml );
-
-					// show / hide navigation buttons
-
-					this._toggleControls( 'left', -1 );
-
-					this._toggleControls( 'right', 1 );
-
-				}
-
-				else {
-
-					var fml; // future margin left
-
-					( dir === 'right' ) 
-
-						? fml = Math.abs( ml ) + this.options.margin + Math.abs( amount ) 
-
-						: fml = Math.abs( ml ) - this.options.margin - Math.abs( amount );
-
-					
-
-					// show / hide navigation buttons
-
-					if( fml > 0 )
-
-						this._toggleControls( 'left', 1 );
-
-					else	
-
-						this._toggleControls( 'left', -1 );
-
-					
-
-					if( fml < this.sliderW - this.visibleWidth )
-
-						this._toggleControls( 'right', 1 );
-
-					else	
-
-						this._toggleControls( 'right', -1 );
-
-						
-
-				}
-
-				
-
-				( dir === 'right' ) ? val = '-=' + amount : val = '+=' + amount
-
-				
-
-			}
-
-			else {
-
-				var fml		= Math.abs( val ); // future margin left
-
-				
-
-				if( Math.max( this.sliderW, this.visibleWidth ) - fml < this.visibleWidth ) {
-
-					val	= - ( Math.max( this.sliderW, this.visibleWidth ) - this.visibleWidth );
-
-					if( val !== 0 )
-
-						val += this.options.margin;	// decrease the margin left if not on the first position
-
-						
-
-					// show / hide navigation buttons
-
-					this._toggleControls( 'right', -1 );
-
-					fml	= Math.abs( val );
-
-				}
-
-				
-
-				// show / hide navigation buttons
-
-				if( fml > 0 )
-
-					this._toggleControls( 'left', 1 );
-
-				else
-
-					this._toggleControls( 'left', -1 );
-
-				
-
-				if( Math.max( this.sliderW, this.visibleWidth ) - this.visibleWidth > fml + this.options.margin )	
-
-					this._toggleControls( 'right', 1 );
-
-				else
-
-					this._toggleControls( 'right', -1 );
-
-					
-
-			}
-
-			
-
-			$.fn.applyStyle = ( anim === undefined ) ? $.fn.animate : $.fn.css;
-
-			
-
-			var sliderCSS	= { marginLeft : val };
-
-			
-
-			var instance	= this;
-
-			
-
-			this.$slider.applyStyle( sliderCSS, $.extend( true, [], { duration : this.options.speed, easing : this.options.easing, complete : function() {
-
-				if( callback ) callback.call();
-
-			} } ) );
-
-			
-
-		},
-
-		_slideToCurrent		: function( anim ) {
-
-			
-
-			// how much to slide?
-
-			var amount	= this.current * this.itemW;
-
-			this._slide('', -amount, anim );
-
-			
-
-		},
-
-		add					: function( $newelems, callback ) {
-
-			
-
-			// adds new items to the carousel
-
-			this.$items 		= this.$items.add( $newelems );
-
-			this.itemsCount		= this.$items.length;
-
-			this._setDim();
-
-			this._setCurrentValues();
-
-			this.$slider.css({
-
-				width	: this.sliderW
-
-			});
-
-			this._slideToCurrent();
-
-			
-
-			if ( callback ) callback.call( $newelems );
-
-			
-
-		},
-
-		destroy				: function( callback ) {
-
-			this._destroy( callback );
-
-		},
-
-		_destroy 			: function( callback ) {
-
-			this.$el.unbind('.elastislide').removeData('elastislide');
-
-			$(window).unbind('.elastislide');
-
-			if ( callback ) callback.call();
-
-		}
-
-	};
-
-	
-
-	var logError 				= function( message ) {
-
-		if ( this.console ) {
-
-			console.error( message );
-
-		}
-
-	};
-
-	
-
-	$.fn.elastislide 				= function( options ) {
-
-		if ( typeof options === 'string' ) {
-
-			var args = Array.prototype.slice.call( arguments, 1 );
-
-
-
-			this.each(function() {
-
-				var instance = $.data( this, 'elastislide' );
-
-				if ( !instance ) {
-
-					logError( "cannot call methods on elastislide prior to initialization; " +
-
-					"attempted to call method '" + options + "'" );
-
-					return;
-
-				}
-
-				if ( !$.isFunction( instance[options] ) || options.charAt(0) === "_" ) {
-
-					logError( "no such method '" + options + "' for elastislide instance" );
-
-					return;
-
-				}
-
-				instance[ options ].apply( instance, args );
-
-			});
-
-		} 
-
-		else {
-
-			this.each(function() {
-
-				var instance = $.data( this, 'elastislide' );
-
-				if ( !instance ) {
-
-					$.data( this, 'elastislide', new $.elastislide( options, this ) );
-
-				}
-
-			});
-
-		}
-
-		return this;
-
-	};
-
-	
-
+(function( window, $, undefined ) {
+
+	
+
+	// http://www.netcu.de/jquery-touchwipe-iphone-ipad-library
+
+	$.fn.touchwipe 				= function(settings) {
+
+		
+
+		var config = {
+
+			min_move_x: 20,
+
+			min_move_y: 20,
+
+			wipeLeft: function() { },
+
+			wipeRight: function() { },
+
+			wipeUp: function() { },
+
+			wipeDown: function() { },
+
+			preventDefaultEvents: true
+
+		};
+
+     
+
+		if (settings) $.extend(config, settings);
+
+ 
+
+		this.each(function() {
+
+			var startX;
+
+			var startY;
+
+			var isMoving = false;
+
+
+
+			function cancelTouch() {
+
+				this.removeEventListener('touchmove', onTouchMove);
+
+				startX = null;
+
+				isMoving = false;
+
+			}	
+
+		 
+
+			function onTouchMove(e) {
+
+				if(config.preventDefaultEvents) {
+
+					e.preventDefault();
+
+				}
+
+				if(isMoving) {
+
+					var x = e.touches[0].pageX;
+
+					var y = e.touches[0].pageY;
+
+					var dx = startX - x;
+
+					var dy = startY - y;
+
+					if(Math.abs(dx) >= config.min_move_x) {
+
+						cancelTouch();
+
+						if(dx > 0) {
+
+							config.wipeLeft();
+
+						}
+
+						else {
+
+							config.wipeRight();
+
+						}
+
+					}
+
+					else if(Math.abs(dy) >= config.min_move_y) {
+
+						cancelTouch();
+
+						if(dy > 0) {
+
+							config.wipeDown();
+
+						}
+
+						else {
+
+							config.wipeUp();
+
+						}
+
+					}
+
+				}
+
+			}
+
+		 
+
+			function onTouchStart(e)
+
+			{
+
+				if (e.touches.length == 1) {
+
+					startX = e.touches[0].pageX;
+
+					startY = e.touches[0].pageY;
+
+					isMoving = true;
+
+					this.addEventListener('touchmove', onTouchMove, false);
+
+				}
+
+			}    	 
+
+			if ('ontouchstart' in document.documentElement) {
+
+				this.addEventListener('touchstart', onTouchStart, false);
+
+			}
+
+		});
+
+ 
+
+		return this;
+
+	};
+
+	
+
+	$.elastislide 				= function( options, element ) {
+
+		this.$el	= $( element );
+
+		this._init( options );
+
+	};
+
+	
+
+	$.elastislide.defaults 		= {
+
+		speed		: 1000,	// animation speed
+
+		easing		: '',	// animation easing effect
+
+		imageW		: 'auto',	// the images width
+
+		margin		: 0,	// image margin right
+
+		border		: 0,	// image border
+
+		minItems	: 1,	// the minimum number of items to show. 
+
+							// when we resize the window, this will make sure minItems are always shown 
+
+							// (unless of course minItems is higher than the total number of elements)
+
+		current		: 0	// index of the current item
+
+							// when we resize the window, the carousel will make sure this item is visible 
+
+		//onClick		: function() { return true; } // click item callback
+
+    };
+
+	
+
+	$.elastislide.prototype 	= {
+
+		_init 				: function( options ) {
+
+			
+
+			this.options 		= $.extend( true, {}, $.elastislide.defaults, options );
+
+			
+
+			// <ul>
+
+			this.$slider		= this.$el.find('ul');
+
+			
+
+			// <li>
+
+			this.$items			= this.$slider.children('li');
+
+			
+
+			// total number of elements / images
+
+			this.itemsCount		= this.$items.length;
+
+			
+
+			// cache the <ul>'s parent, since we will eventually need to recalculate its width on window resize
+
+			this.$esCarousel	= this.$slider.parent();
+
+			
+
+			// validate options
+
+			this._validateOptions();
+
+			
+
+			// set sizes and initialize some vars...
+
+			this._configure();
+
+			
+
+			// add navigation buttons
+
+			this._addControls();
+
+			
+
+			// initialize the events
+
+			this._initEvents();
+
+			
+
+			// show the <ul>
+
+			this.$slider.show();
+
+			
+
+			// slide to current's position
+
+			this._slideToCurrent( false );
+
+			
+
+		},
+
+		_validateOptions	: function() {
+
+		
+
+			if( this.options.speed < 0 )
+
+				this.options.speed = 450;
+
+			if( this.options.margin < 0 )
+
+				this.options.margin = 4;
+
+			if( this.options.border < 0 )
+
+				this.options.border = 1;
+
+			if( this.options.minItems < 1 || this.options.minItems > this.itemsCount )
+
+				this.options.minItems = 1;
+
+			if( this.options.current > this.itemsCount - 1 )
+
+				this.options.current = 0;
+
+				
+
+		},
+
+		_configure			: function() {
+
+			
+
+			// current item's index
+
+			this.current		= this.options.current;
+
+			
+
+			// the ul's parent's (div.es-carousel) width is the "visible" width
+
+			this.visibleWidth	= this.$esCarousel.width();
+
+			
+
+			// test to see if we need to initially resize the items
+
+			if( this.visibleWidth < this.options.minItems * ( this.options.imageW + 2 * this.options.border ) + ( this.options.minItems - 1 ) * this.options.margin ) {
+
+				this._setDim( ( this.visibleWidth - ( this.options.minItems - 1 ) * this.options.margin ) / this.options.minItems );
+
+				this._setCurrentValues();
+
+				// how many items fit with the current width
+
+				this.fitCount	= this.options.minItems;
+
+			}
+
+			else {
+
+				this._setDim();
+
+				this._setCurrentValues();
+
+			}
+
+			
+
+			// set the <ul> width
+
+			this.$slider.css({
+
+				width	: this.sliderW
+
+			});
+
+			
+
+		},
+
+		_setDim				: function( elW ) {
+
+			
+
+			// <li> style
+
+			this.$items.css({
+
+				//marginRight	: this.options.margin,
+
+				width		: ( elW ) ? elW : this.options.imageW + 2 * this.options.border
+
+			}).children('a').css({ // <a> style
+
+				borderWidth		: this.options.border
+
+			});
+
+			
+
+		},
+
+		_setCurrentValues	: function() {
+
+			
+
+			// the total space occupied by one item
+
+			this.itemW			= this.$items.outerWidth(true);
+
+			
+
+			// total width of the slider / <ul>
+
+			// this will eventually change on window resize
+
+			this.sliderW		= this.itemW * this.itemsCount;
+
+			
+
+			// the ul parent's (div.es-carousel) width is the "visible" width
+
+			this.visibleWidth	= this.$esCarousel.width();
+
+			
+
+			// how many items fit with the current width
+
+			this.fitCount		= Math.floor( this.visibleWidth / this.itemW );
+
+			
+
+		},
+
+		_addControls		: function() {
+
+			
+
+			this.$navNext	= $('<span class="es-nav-next">Next</span>');
+
+			this.$navPrev	= $('<span class="es-nav-prev">Previous</span>');
+
+			$('<div class="es-nav"/>')
+
+			.append( this.$navPrev )
+
+			.append( this.$navNext )
+
+			.appendTo( this.$el );
+
+			
+
+			//this._toggleControls();
+
+				
+
+		},
+
+		_toggleControls		: function( dir, status ) {
+
+			
+
+			// show / hide navigation buttons
+
+			if( dir && status ) {
+
+				if( status === 1 )
+
+					( dir === 'right' ) ? this.$navNext.css({"cursor":"pointer", "opacity":"1"}) : this.$navPrev.css({"cursor":"pointer", "opacity":"1"});
+
+				else
+
+					( dir === 'right' ) ? this.$navNext.css({"cursor":"auto", "opacity":"0.2"}) : this.$navPrev.css({"cursor":"auto", "opacity":"0.2"});
+
+			}
+
+			else if( this.current === this.itemsCount - 1 || this.fitCount >= this.itemsCount )
+
+					this.$navNext.css({"cursor":"auto"});
+
+					TopSlider();
+
+			
+
+		},
+
+		_initEvents			: function() {
+
+			
+
+			var instance	= this;
+
+			
+
+			// window resize
+
+			$(window).bind('resize.elastislide', function( event ) {
+
+				
+
+				// set values again
+
+				instance._setCurrentValues();
+
+				
+
+				// need to resize items
+
+				if( instance.visibleWidth < instance.options.minItems * ( instance.options.imageW + 2 * instance.options.border ) + ( instance.options.minItems - 1 ) * instance.options.margin ) {
+
+					instance._setDim( ( instance.visibleWidth - ( instance.options.minItems - 1 ) * instance.options.margin ) / instance.options.minItems );
+
+					instance._setCurrentValues();
+
+					instance.fitCount	= instance.options.minItems;
+
+				}	
+
+				else{
+
+					instance._setDim();
+
+					instance._setCurrentValues();
+
+				}
+
+				
+
+				instance.$slider.css({
+
+					width	: instance.sliderW + 10 // TODO: +10px seems to solve a firefox "bug" :S
+
+				});
+
+						
+
+				// slide to the current element
+
+				clearTimeout( instance.resetTimeout );
+
+				instance.resetTimeout	= setTimeout(function() {
+
+					instance._slideToCurrent();
+
+				}, 200);
+
+				
+
+			});
+
+			
+
+			// navigation buttons events
+
+			this.$navNext.bind('click.elastislide', function( event ) {
+
+				instance._slide('right');
+
+			});
+
+			
+
+			this.$navPrev.bind('click.elastislide', function( event ) {
+
+				instance._slide('left');
+
+			});
+
+			
+
+			// item click event
+
+			//this.$items.bind('click.elastislide', function( event ) {
+
+				//instance.options.onClick( $(this) );
+
+				//return true;
+
+			//});
+
+			
+
+			// touch events
+
+			instance.$slider.touchwipe({
+
+				wipeLeft			: function() {
+
+					instance._slide('right');
+
+				},
+
+				wipeRight			: function() {
+
+					instance._slide('left');
+
+				}
+
+			});
+
+			
+
+		},
+
+		_slide				: function( dir, val, anim, callback ) {
+
+			
+
+			// if animating return
+
+			if( this.$slider.is(':animated') )
+
+				return false;
+
+			
+
+			// current margin left
+
+			var ml		= parseFloat( this.$slider.css('margin-left') );
+
+			
+
+			// val is just passed when we want an exact value for the margin left (used in the _slideToCurrent function)
+
+			if( val === undefined ) {
+
+			
+
+				// how much to slide?
+
+				var amount	= this.fitCount * this.itemW, val;
+
+				
+
+				if( amount < 0 ) return false;
+
+				
+
+				// make sure not to leave a space between the last item / first item and the end / beggining of the slider available width
+
+				if( dir === 'right' && this.sliderW - ( Math.abs( ml ) + amount ) < this.visibleWidth ) {
+
+					amount	= this.sliderW - ( Math.abs( ml ) + this.visibleWidth ) - this.options.margin; // decrease the margin left
+
+					// show / hide navigation buttons
+
+					this._toggleControls( 'right', -1 );
+
+					this._toggleControls( 'left', 1 );
+
+				}
+
+				else if( dir === 'left' && Math.abs( ml ) - amount < 0 ) {				
+
+					amount	= Math.abs( ml );
+
+					// show / hide navigation buttons
+
+					this._toggleControls( 'left', -1 );
+
+					this._toggleControls( 'right', 1 );
+
+				}
+
+				else {
+
+					var fml; // future margin left
+
+					( dir === 'right' ) 
+
+						? fml = Math.abs( ml ) + this.options.margin + Math.abs( amount ) 
+
+						: fml = Math.abs( ml ) - this.options.margin - Math.abs( amount );
+
+					
+
+					// show / hide navigation buttons
+
+					if( fml > 0 )
+
+						this._toggleControls( 'left', 1 );
+
+					else	
+
+						this._toggleControls( 'left', -1 );
+
+					
+
+					if( fml < this.sliderW - this.visibleWidth )
+
+						this._toggleControls( 'right', 1 );
+
+					else	
+
+						this._toggleControls( 'right', -1 );
+
+						
+
+				}
+
+				
+
+				( dir === 'right' ) ? val = '-=' + amount : val = '+=' + amount
+
+				
+
+			}
+
+			else {
+
+				var fml		= Math.abs( val ); // future margin left
+
+				
+
+				if( Math.max( this.sliderW, this.visibleWidth ) - fml < this.visibleWidth ) {
+
+					val	= - ( Math.max( this.sliderW, this.visibleWidth ) - this.visibleWidth );
+
+					if( val !== 0 )
+
+						val += this.options.margin;	// decrease the margin left if not on the first position
+
+						
+
+					// show / hide navigation buttons
+
+					this._toggleControls( 'right', -1 );
+
+					fml	= Math.abs( val );
+
+				}
+
+				
+
+				// show / hide navigation buttons
+
+				if( fml > 0 )
+
+					this._toggleControls( 'left', 1 );
+
+				else
+
+					this._toggleControls( 'left', -1 );
+
+				
+
+				if( Math.max( this.sliderW, this.visibleWidth ) - this.visibleWidth > fml + this.options.margin )	
+
+					this._toggleControls( 'right', 1 );
+
+				else
+
+					this._toggleControls( 'right', -1 );
+
+					
+
+			}
+
+			
+
+			$.fn.applyStyle = ( anim === undefined ) ? $.fn.animate : $.fn.css;
+
+			
+
+			var sliderCSS	= { marginLeft : val };
+
+			
+
+			var instance	= this;
+
+			
+
+			this.$slider.applyStyle( sliderCSS, $.extend( true, [], { duration : this.options.speed, easing : this.options.easing, complete : function() {
+
+				if( callback ) callback.call();
+
+			} } ) );
+
+			
+
+		},
+
+		_slideToCurrent		: function( anim ) {
+
+			
+
+			// how much to slide?
+
+			var amount	= this.current * this.itemW;
+
+			this._slide('', -amount, anim );
+
+			
+
+		},
+
+		add					: function( $newelems, callback ) {
+
+			
+
+			// adds new items to the carousel
+
+			this.$items 		= this.$items.add( $newelems );
+
+			this.itemsCount		= this.$items.length;
+
+			this._setDim();
+
+			this._setCurrentValues();
+
+			this.$slider.css({
+
+				width	: this.sliderW
+
+			});
+
+			this._slideToCurrent();
+
+			
+
+			if ( callback ) callback.call( $newelems );
+
+			
+
+		},
+
+		destroy				: function( callback ) {
+
+			this._destroy( callback );
+
+		},
+
+		_destroy 			: function( callback ) {
+
+			this.$el.unbind('.elastislide').removeData('elastislide');
+
+			$(window).unbind('.elastislide');
+
+			if ( callback ) callback.call();
+
+		}
+
+	};
+
+	
+
+	var logError 				= function( message ) {
+
+		if ( this.console ) {
+
+			console.error( message );
+
+		}
+
+	};
+
+	
+
+	$.fn.elastislide 				= function( options ) {
+
+		if ( typeof options === 'string' ) {
+
+			var args = Array.prototype.slice.call( arguments, 1 );
+
+
+
+			this.each(function() {
+
+				var instance = $.data( this, 'elastislide' );
+
+				if ( !instance ) {
+
+					logError( "cannot call methods on elastislide prior to initialization; " +
+
+					"attempted to call method '" + options + "'" );
+
+					return;
+
+				}
+
+				if ( !$.isFunction( instance[options] ) || options.charAt(0) === "_" ) {
+
+					logError( "no such method '" + options + "' for elastislide instance" );
+
+					return;
+
+				}
+
+				instance[ options ].apply( instance, args );
+
+			});
+
+		} 
+
+		else {
+
+			this.each(function() {
+
+				var instance = $.data( this, 'elastislide' );
+
+				if ( !instance ) {
+
+					$.data( this, 'elastislide', new $.elastislide( options, this ) );
+
+				}
+
+			});
+
+		}
+
+		return this;
+
+	};
+
+	
+
 })( window, jQuery );
\ No newline at end of file
Index: E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/js/responsiveslides.js
===================================================================
--- E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/js/responsiveslides.js	(revision 8)
+++ E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/js/responsiveslides.js	(revision 9)
@@ -1,644 +1,644 @@
-/*! ResponsiveSlides.js v1.32
-
- * http://responsiveslides.com
-
- * http://viljamis.com
-
- *
-
- * Copyright (c) 2011-2012 @viljamis
-
- * Available under the MIT license
-
- */
-
-
-
-/*jslint browser: true, sloppy: true, vars: true, plusplus: true, indent: 2 */
-
-
-
-(function ($, window, i) {
-
-  $.fn.responsiveSlides = function (options) {
-
-
-
-    // Default settings
-
-    var settings = $.extend({
-
-      "auto": true,             // Boolean: Animate automatically, true or false
-
-      "speed": 1000,            // Integer: Speed of the transition, in milliseconds
-
-      "timeout": 4000,          // Integer: Time between slide transitions, in milliseconds
-
-      "pager": false,           // Boolean: Show pager, true or false
-
-      "nav": false,             // Boolean: Show navigation, true or false
-
-      "random": false,          // Boolean: Randomize the order of the slides, true or false
-
-      "pause": false,           // Boolean: Pause on hover, true or false
-
-      "pauseControls": false,   // Boolean: Pause when hovering controls, true or false
-
-      "prevText": "Previous",   // String: Text for the "previous" button
-
-      "nextText": "Next",       // String: Text for the "next" button
-
-      "maxwidth": "",           // Integer: Max-width of the slideshow, in pixels
-
-      "controls": "",           // Selector: Where controls should be appended to, default is after the <ul>
-
-      "namespace": "rslides",   // String: change the default namespace used
-
-      before: function () {},   // Function: Before callback
-
-      after: function () {}     // Function: After callback
-
-    }, options);
-
-
-
-    return this.each(function () {
-
-
-
-      // Index for namespacing
-
-      i++;
-
-
-
-      var $this = $(this),
-
-
-
-        // Local variables
-
-        selectTab,
-
-        startCycle,
-
-        restartCycle,
-
-        rotate,
-
-        $tabs,
-
-
-
-        // Helpers
-
-        index = 0,
-
-        $slide = $this.children(),
-
-        length = $slide.size(),
-
-        fadeTime = parseFloat(settings.speed),
-
-        waitTime = parseFloat(settings.timeout),
-
-        maxw = parseFloat(settings.maxwidth),
-
-
-
-        // Namespacing
-
-        namespace = settings.namespace,
-
-        namespaceIdx = namespace + i,
-
-
-
-        // Classes
-
-        navClass = namespace + "_nav " + namespaceIdx + "_nav",
-
-        activeClass = namespace + "_here",
-
-        visibleClass = namespaceIdx + "_on",
-
-        slideClassPrefix = namespaceIdx + "_s",
-
-
-
-        // Pager
-
-        $pager = $("<ul class='" + namespace + "_tabs " + namespaceIdx + "_tabs' />"),
-
-
-
-        // Styles for visible and hidden slides
-
-        visible = {"float": "left", "position": "relative"},
-
-        hidden = {"float": "none", "position": "absolute"},
-
-
-
-        // Fading animation
-
-        slideTo = function (idx) {
-
-          settings.before();
-
-          $slide
-
-            .stop()
-
-            .fadeOut(fadeTime, function () {
-
-              $(this)
-
-                .removeClass(visibleClass)
-
-                .css(hidden);
-
-            })
-
-            .eq(idx)
-
-            .fadeIn(fadeTime, function () {
-
-              $(this)
-
-                .addClass(visibleClass)
-
-                .css(visible);
-
-              settings.after();
-
-              index = idx;
-
-            });
-
-        };
-
-
-
-      // Random order
-
-      if (settings.random) {
-
-        $slide.sort(function () {
-
-          return (Math.round(Math.random()) - 0.5);
-
-        });
-
-        $this
-
-          .empty()
-
-          .append($slide);
-
-      }
-
-
-
-      // Add ID's to each slide
-
-      $slide.each(function (i) {
-
-        this.id = slideClassPrefix + i;
-
-      });
-
-
-
-      // Add max-width and classes
-
-      $this.addClass(namespace + " " + namespaceIdx);
-
-      if (options && options.maxwidth) {
-
-        $this.css("max-width", maxw);
-
-      }
-
-
-
-      // Hide all slides, then show first one
-
-      $slide
-
-        .hide()
-
-        .eq(0)
-
-        .addClass(visibleClass)
-
-        .css(visible)
-
-        .show();
-
-
-
-      // Only run if there's more than one slide
-
-      if ($slide.size() > 1) {
-
-
-
-        // Make sure the timeout is at least 100ms longer than the fade
-
-        if (waitTime < fadeTime + 100) {
-
-          return;
-
-        }
-
-
-
-        // Pager
-
-        if (settings.pager) {
-
-          var tabMarkup = [];
-
-          $slide.each(function (i) {
-
-            var n = i + 1;
-
-            tabMarkup +=
-
-              "<li>" +
-
-              "<a href='#' class='" + slideClassPrefix + n + "'>" + n + "</a>" +
-
-              "</li>";
-
-          });
-
-          $pager.append(tabMarkup);
-
-
-
-          $tabs = $pager.find("a");
-
-
-
-          // Inject pager
-
-          if (options.controls) {
-
-            $(settings.controls).append($pager);
-
-          } else {
-
-            $this.after($pager);
-
-          }
-
-
-
-          // Select pager item
-
-          selectTab = function (idx) {
-
-            $tabs
-
-              .closest("li")
-
-              .removeClass(activeClass)
-
-              .eq(idx)
-
-              .addClass(activeClass);
-
-          };
-
-        }
-
-
-
-        // Auto cycle
-
-        if (settings.auto) {
-
-
-
-          startCycle = function () {
-
-            rotate = setInterval(function () {
-
-
-
-              // Clear the event queue
-
-              $slide.stop(true, true);
-
-
-
-              var idx = index + 1 < length ? index + 1 : 0;
-
-
-
-              // Remove active state and set new if pager is set
-
-              if (settings.pager) {
-
-                selectTab(idx);
-
-              }
-
-
-
-              slideTo(idx);
-
-            }, waitTime);
-
-          };
-
-
-
-          // Init cycle
-
-          startCycle();
-
-        }
-
-
-
-        // Restarting cycle
-
-        restartCycle = function () {
-
-          if (settings.auto) {
-
-            // Stop
-
-            clearInterval(rotate);
-
-            // Restart
-
-            startCycle();
-
-          }
-
-        };
-
-
-
-        // Pause on hover
-
-        if (settings.pause) {
-
-          $this.hover(function () {
-
-            clearInterval(rotate);
-
-          }, function () {
-
-            restartCycle();
-
-          });
-
-        }
-
-
-
-        // Pager click event handler
-
-        if (settings.pager) {
-
-          $tabs.bind("click", function (e) {
-
-            e.preventDefault();
-
-
-
-            if (!settings.pauseControls) {
-
-              restartCycle();
-
-            }
-
-
-
-            // Get index of clicked tab
-
-            var idx = $tabs.index(this);
-
-
-
-            // Break if element is already active or currently animated
-
-            if (index === idx || $("." + visibleClass + ":animated").length) {
-
-              return;
-
-            }
-
-
-
-            // Remove active state from old tab and set new one
-
-            selectTab(idx);
-
-
-
-            // Do the animation
-
-            slideTo(idx);
-
-          })
-
-            .eq(0)
-
-            .closest("li")
-
-            .addClass(activeClass);
-
-
-
-          // Pause when hovering pager
-
-          if (settings.pauseControls) {
-
-            $tabs.hover(function () {
-
-              clearInterval(rotate);
-
-            }, function () {
-
-              restartCycle();
-
-            });
-
-          }
-
-        }
-
-
-
-        // Navigation
-
-        if (settings.nav) {
-
-          var navMarkup =
-
-            "<a href='#' class='" + navClass + " prev'>" + settings.prevText + "</a>" +
-
-            "<a href='#' class='" + navClass + " next'>" + settings.nextText + "</a>";
-
-
-
-          // Inject navigation
-
-          if (options.controls) {
-
-            $(settings.controls).append(navMarkup);
-
-          } else {
-
-            $this.after(navMarkup);
-
-          }
-
-
-
-          var $trigger = $("." + namespaceIdx + "_nav"),
-
-            $prev = $("." + namespaceIdx + "_nav.prev");
-
-
-
-          // Click event handler
-
-          $trigger.bind("click", function (e) {
-
-            e.preventDefault();
-
-
-
-            // Prevent clicking if currently animated
-
-            if ($("." + visibleClass + ":animated").length) {
-
-              return;
-
-            }
-
-
-
-            //  Adds active class during slide animation
-
-            //  $(this)
-
-            //    .addClass(namespace + "_active")
-
-            //    .delay(fadeTime)
-
-            //    .queue(function (next) {
-
-            //      $(this).removeClass(namespace + "_active");
-
-            //      next();
-
-            //  });
-
-
-
-            // Determine where to slide
-
-            var idx = $slide.index($("." + visibleClass)),
-
-              prevIdx = idx - 1,
-
-              nextIdx = idx + 1 < length ? index + 1 : 0;
-
-
-
-            // Go to slide
-
-            slideTo($(this)[0] === $prev[0] ? prevIdx : nextIdx);
-
-            if (settings.pager) {
-
-              selectTab($(this)[0] === $prev[0] ? prevIdx : nextIdx);
-
-            }
-
-
-
-            if (!settings.pauseControls) {
-
-              restartCycle();
-
-            }
-
-          });
-
-
-
-          // Pause when hovering navigation
-
-          if (settings.pauseControls) {
-
-            $trigger.hover(function () {
-
-              clearInterval(rotate);
-
-            }, function () {
-
-              restartCycle();
-
-            });
-
-          }
-
-        }
-
-
-
-      }
-
-
-
-      // Max-width fallback
-
-      if (typeof document.body.style.maxWidth === "undefined" && options.maxwidth) {
-
-        var widthSupport = function () {
-
-          $this.css("width", "100%");
-
-          if ($this.width() > maxw) {
-
-            $this.css("width", maxw);
-
-          }
-
-        };
-
-
-
-        // Init fallback
-
-        widthSupport();
-
-        $(window).bind("resize", function () {
-
-          widthSupport();
-
-        });
-
-      }
-
-
-
-    });
-
-
-
-  };
-
-})(jQuery, this, 0);
-
-
-
+/*! ResponsiveSlides.js v1.32
+
+ * http://responsiveslides.com
+
+ * http://viljamis.com
+
+ *
+
+ * Copyright (c) 2011-2012 @viljamis
+
+ * Available under the MIT license
+
+ */
+
+
+
+/*jslint browser: true, sloppy: true, vars: true, plusplus: true, indent: 2 */
+
+
+
+(function ($, window, i) {
+
+  $.fn.responsiveSlides = function (options) {
+
+
+
+    // Default settings
+
+    var settings = $.extend({
+
+      "auto": true,             // Boolean: Animate automatically, true or false
+
+      "speed": 1000,            // Integer: Speed of the transition, in milliseconds
+
+      "timeout": 4000,          // Integer: Time between slide transitions, in milliseconds
+
+      "pager": false,           // Boolean: Show pager, true or false
+
+      "nav": false,             // Boolean: Show navigation, true or false
+
+      "random": false,          // Boolean: Randomize the order of the slides, true or false
+
+      "pause": false,           // Boolean: Pause on hover, true or false
+
+      "pauseControls": false,   // Boolean: Pause when hovering controls, true or false
+
+      "prevText": "Previous",   // String: Text for the "previous" button
+
+      "nextText": "Next",       // String: Text for the "next" button
+
+      "maxwidth": "",           // Integer: Max-width of the slideshow, in pixels
+
+      "controls": "",           // Selector: Where controls should be appended to, default is after the <ul>
+
+      "namespace": "rslides",   // String: change the default namespace used
+
+      before: function () {},   // Function: Before callback
+
+      after: function () {}     // Function: After callback
+
+    }, options);
+
+
+
+    return this.each(function () {
+
+
+
+      // Index for namespacing
+
+      i++;
+
+
+
+      var $this = $(this),
+
+
+
+        // Local variables
+
+        selectTab,
+
+        startCycle,
+
+        restartCycle,
+
+        rotate,
+
+        $tabs,
+
+
+
+        // Helpers
+
+        index = 0,
+
+        $slide = $this.children(),
+
+        length = $slide.size(),
+
+        fadeTime = parseFloat(settings.speed),
+
+        waitTime = parseFloat(settings.timeout),
+
+        maxw = parseFloat(settings.maxwidth),
+
+
+
+        // Namespacing
+
+        namespace = settings.namespace,
+
+        namespaceIdx = namespace + i,
+
+
+
+        // Classes
+
+        navClass = namespace + "_nav " + namespaceIdx + "_nav",
+
+        activeClass = namespace + "_here",
+
+        visibleClass = namespaceIdx + "_on",
+
+        slideClassPrefix = namespaceIdx + "_s",
+
+
+
+        // Pager
+
+        $pager = $("<ul class='" + namespace + "_tabs " + namespaceIdx + "_tabs' />"),
+
+
+
+        // Styles for visible and hidden slides
+
+        visible = {"float": "left", "position": "relative"},
+
+        hidden = {"float": "none", "position": "absolute"},
+
+
+
+        // Fading animation
+
+        slideTo = function (idx) {
+
+          settings.before();
+
+          $slide
+
+            .stop()
+
+            .fadeOut(fadeTime, function () {
+
+              $(this)
+
+                .removeClass(visibleClass)
+
+                .css(hidden);
+
+            })
+
+            .eq(idx)
+
+            .fadeIn(fadeTime, function () {
+
+              $(this)
+
+                .addClass(visibleClass)
+
+                .css(visible);
+
+              settings.after();
+
+              index = idx;
+
+            });
+
+        };
+
+
+
+      // Random order
+
+      if (settings.random) {
+
+        $slide.sort(function () {
+
+          return (Math.round(Math.random()) - 0.5);
+
+        });
+
+        $this
+
+          .empty()
+
+          .append($slide);
+
+      }
+
+
+
+      // Add ID's to each slide
+
+      $slide.each(function (i) {
+
+        this.id = slideClassPrefix + i;
+
+      });
+
+
+
+      // Add max-width and classes
+
+      $this.addClass(namespace + " " + namespaceIdx);
+
+      if (options && options.maxwidth) {
+
+        $this.css("max-width", maxw);
+
+      }
+
+
+
+      // Hide all slides, then show first one
+
+      $slide
+
+        .hide()
+
+        .eq(0)
+
+        .addClass(visibleClass)
+
+        .css(visible)
+
+        .show();
+
+
+
+      // Only run if there's more than one slide
+
+      if ($slide.size() > 1) {
+
+
+
+        // Make sure the timeout is at least 100ms longer than the fade
+
+        if (waitTime < fadeTime + 100) {
+
+          return;
+
+        }
+
+
+
+        // Pager
+
+        if (settings.pager) {
+
+          var tabMarkup = [];
+
+          $slide.each(function (i) {
+
+            var n = i + 1;
+
+            tabMarkup +=
+
+              "<li>" +
+
+              "<a href='#' class='" + slideClassPrefix + n + "'>" + n + "</a>" +
+
+              "</li>";
+
+          });
+
+          $pager.append(tabMarkup);
+
+
+
+          $tabs = $pager.find("a");
+
+
+
+          // Inject pager
+
+          if (options.controls) {
+
+            $(settings.controls).append($pager);
+
+          } else {
+
+            $this.after($pager);
+
+          }
+
+
+
+          // Select pager item
+
+          selectTab = function (idx) {
+
+            $tabs
+
+              .closest("li")
+
+              .removeClass(activeClass)
+
+              .eq(idx)
+
+              .addClass(activeClass);
+
+          };
+
+        }
+
+
+
+        // Auto cycle
+
+        if (settings.auto) {
+
+
+
+          startCycle = function () {
+
+            rotate = setInterval(function () {
+
+
+
+              // Clear the event queue
+
+              $slide.stop(true, true);
+
+
+
+              var idx = index + 1 < length ? index + 1 : 0;
+
+
+
+              // Remove active state and set new if pager is set
+
+              if (settings.pager) {
+
+                selectTab(idx);
+
+              }
+
+
+
+              slideTo(idx);
+
+            }, waitTime);
+
+          };
+
+
+
+          // Init cycle
+
+          startCycle();
+
+        }
+
+
+
+        // Restarting cycle
+
+        restartCycle = function () {
+
+          if (settings.auto) {
+
+            // Stop
+
+            clearInterval(rotate);
+
+            // Restart
+
+            startCycle();
+
+          }
+
+        };
+
+
+
+        // Pause on hover
+
+        if (settings.pause) {
+
+          $this.hover(function () {
+
+            clearInterval(rotate);
+
+          }, function () {
+
+            restartCycle();
+
+          });
+
+        }
+
+
+
+        // Pager click event handler
+
+        if (settings.pager) {
+
+          $tabs.bind("click", function (e) {
+
+            e.preventDefault();
+
+
+
+            if (!settings.pauseControls) {
+
+              restartCycle();
+
+            }
+
+
+
+            // Get index of clicked tab
+
+            var idx = $tabs.index(this);
+
+
+
+            // Break if element is already active or currently animated
+
+            if (index === idx || $("." + visibleClass + ":animated").length) {
+
+              return;
+
+            }
+
+
+
+            // Remove active state from old tab and set new one
+
+            selectTab(idx);
+
+
+
+            // Do the animation
+
+            slideTo(idx);
+
+          })
+
+            .eq(0)
+
+            .closest("li")
+
+            .addClass(activeClass);
+
+
+
+          // Pause when hovering pager
+
+          if (settings.pauseControls) {
+
+            $tabs.hover(function () {
+
+              clearInterval(rotate);
+
+            }, function () {
+
+              restartCycle();
+
+            });
+
+          }
+
+        }
+
+
+
+        // Navigation
+
+        if (settings.nav) {
+
+          var navMarkup =
+
+            "<a href='#' class='" + navClass + " prev'>" + settings.prevText + "</a>" +
+
+            "<a href='#' class='" + navClass + " next'>" + settings.nextText + "</a>";
+
+
+
+          // Inject navigation
+
+          if (options.controls) {
+
+            $(settings.controls).append(navMarkup);
+
+          } else {
+
+            $this.after(navMarkup);
+
+          }
+
+
+
+          var $trigger = $("." + namespaceIdx + "_nav"),
+
+            $prev = $("." + namespaceIdx + "_nav.prev");
+
+
+
+          // Click event handler
+
+          $trigger.bind("click", function (e) {
+
+            e.preventDefault();
+
+
+
+            // Prevent clicking if currently animated
+
+            if ($("." + visibleClass + ":animated").length) {
+
+              return;
+
+            }
+
+
+
+            //  Adds active class during slide animation
+
+            //  $(this)
+
+            //    .addClass(namespace + "_active")
+
+            //    .delay(fadeTime)
+
+            //    .queue(function (next) {
+
+            //      $(this).removeClass(namespace + "_active");
+
+            //      next();
+
+            //  });
+
+
+
+            // Determine where to slide
+
+            var idx = $slide.index($("." + visibleClass)),
+
+              prevIdx = idx - 1,
+
+              nextIdx = idx + 1 < length ? index + 1 : 0;
+
+
+
+            // Go to slide
+
+            slideTo($(this)[0] === $prev[0] ? prevIdx : nextIdx);
+
+            if (settings.pager) {
+
+              selectTab($(this)[0] === $prev[0] ? prevIdx : nextIdx);
+
+            }
+
+
+
+            if (!settings.pauseControls) {
+
+              restartCycle();
+
+            }
+
+          });
+
+
+
+          // Pause when hovering navigation
+
+          if (settings.pauseControls) {
+
+            $trigger.hover(function () {
+
+              clearInterval(rotate);
+
+            }, function () {
+
+              restartCycle();
+
+            });
+
+          }
+
+        }
+
+
+
+      }
+
+
+
+      // Max-width fallback
+
+      if (typeof document.body.style.maxWidth === "undefined" && options.maxwidth) {
+
+        var widthSupport = function () {
+
+          $this.css("width", "100%");
+
+          if ($this.width() > maxw) {
+
+            $this.css("width", maxw);
+
+          }
+
+        };
+
+
+
+        // Init fallback
+
+        widthSupport();
+
+        $(window).bind("resize", function () {
+
+          widthSupport();
+
+        });
+
+      }
+
+
+
+    });
+
+
+
+  };
+
+})(jQuery, this, 0);
+
+
+
Index: E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/js/jquery.selectbox-0.2.js
===================================================================
--- E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/js/jquery.selectbox-0.2.js	(revision 8)
+++ E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/js/jquery.selectbox-0.2.js	(revision 9)
@@ -1,1030 +1,1030 @@
-/*!
-
- * jQuery Selectbox plugin 0.2
-
- *
-
- * Copyright 2011-2012, Dimitar Ivanov (http://www.bulgaria-web-developers.com/projects/javascript/selectbox/)
-
- * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
-
- * 
-
- * Date: Tue Jul 17 19:58:36 2012 +0300
-
- */
-
-(function ($, undefined) {
-
-	var PROP_NAME = 'selectbox',
-
-		FALSE = false,
-
-		TRUE = true;
-
-	/**
-
-	 * Selectbox manager.
-
-	 * Use the singleton instance of this class, $.selectbox, to interact with the select box.
-
-	 * Settings for (groups of) select boxes are maintained in an instance object,
-
-	 * allowing multiple different settings on the same page
-
-	 */
-
-	function Selectbox() {
-
-		this._state = [];
-
-		this._defaults = { // Global defaults for all the select box instances
-
-			classHolder: "sbHolder",
-
-			classHolderDisabled: "sbHolderDisabled",
-
-			classSelector: "sbSelector",
-
-			classOptions: "sbOptions",
-
-			classGroup: "sbGroup",
-
-			classSub: "sbSub",
-
-			classDisabled: "sbDisabled",
-
-			classToggleOpen: "sbToggleOpen",
-
-			classToggle: "sbToggle",
-
-			classFocus: "sbFocus",
-
-			speed: 200,
-
-			effect: "slide", // "slide" or "fade"
-
-			onChange: null, //Define a callback function when the selectbox is changed
-
-			onOpen: null, //Define a callback function when the selectbox is open
-
-			onClose: null //Define a callback function when the selectbox is closed
-
-		};
-
-	}
-
-	
-
-	$.extend(Selectbox.prototype, {
-
-		/**
-
-		 * Is the first field in a jQuery collection open as a selectbox
-
-		 * 
-
-		 * @param {Object} target
-
-		 * @return {Boolean}
-
-		 */
-
-		_isOpenSelectbox: function (target) {
-
-			if (!target) {
-
-				return FALSE;
-
-			}
-
-			var inst = this._getInst(target);
-
-			return inst.isOpen;
-
-		},
-
-		/**
-
-		 * Is the first field in a jQuery collection disabled as a selectbox
-
-		 * 
-
-		 * @param {HTMLElement} target
-
-		 * @return {Boolean}
-
-		 */
-
-		_isDisabledSelectbox: function (target) {
-
-			if (!target) {
-
-				return FALSE;
-
-			}
-
-			var inst = this._getInst(target);
-
-			return inst.isDisabled;
-
-		},
-
-		/**
-
-		 * Attach the select box to a jQuery selection.
-
-		 * 
-
-		 * @param {HTMLElement} target
-
-		 * @param {Object} settings
-
-		 */
-
-		_attachSelectbox: function (target, settings) {
-
-			if (this._getInst(target)) {
-
-				return FALSE;
-
-			}
-
-			var $target = $(target),
-
-				self = this,
-
-				inst = self._newInst($target),
-
-				sbHolder, sbSelector, sbToggle, sbOptions,
-
-				s = FALSE, optGroup = $target.find("optgroup"), opts = $target.find("option"), olen = opts.length;
-
-				
-
-			$target.attr("sb", inst.uid);
-
-				
-
-			$.extend(inst.settings, self._defaults, settings);
-
-			self._state[inst.uid] = FALSE;
-
-			$target.hide();
-
-			
-
-			function closeOthers() {
-
-				var key, sel,
-
-					uid = this.attr("id").split("_")[1];
-
-				for (key in self._state) {
-
-					if (key !== uid) {
-
-						if (self._state.hasOwnProperty(key)) {
-
-							sel = $("select[sb='" + key + "']")[0];
-
-							if (sel) {
-
-								self._closeSelectbox(sel);
-
-							}
-
-						}
-
-					}
-
-				}
-
-			}
-
-			
-
-			sbHolder = $("<div>", {
-
-				"id": "sbHolder_" + inst.uid,
-
-				"class": inst.settings.classHolder,
-
-				"tabindex": $target.attr("tabindex")
-
-			});
-
-			
-
-			sbSelector = $("<a>", {
-
-				"id": "sbSelector_" + inst.uid,
-
-				"href": "#",
-
-				"class": inst.settings.classSelector,
-
-				"click": function (e) {
-
-					e.preventDefault();
-
-					closeOthers.apply($(this), []);
-
-					var uid = $(this).attr("id").split("_")[1];
-
-					if (self._state[uid]) {
-
-						self._closeSelectbox(target);
-
-					} else {
-
-						self._openSelectbox(target);
-
-					}
-
-				}
-
-			});
-
-			
-
-			sbToggle = $("<a>", {
-
-				"id": "sbToggle_" + inst.uid,
-
-				"href": "#",
-
-				"class": inst.settings.classToggle,
-
-				"click": function (e) {
-
-					e.preventDefault();
-
-					closeOthers.apply($(this), []);
-
-					var uid = $(this).attr("id").split("_")[1];
-
-					if (self._state[uid]) {
-
-						self._closeSelectbox(target);
-
-					} else {
-
-						self._openSelectbox(target);
-
-					}
-
-				}
-
-			});
-
-			sbToggle.appendTo(sbHolder);
-
-
-
-			sbOptions = $("<ul>", {
-
-				"id": "sbOptions_" + inst.uid,
-
-				"class": inst.settings.classOptions,
-
-				"css": {
-
-					"display": "none"
-
-				}
-
-			});
-
-			
-
-			$target.children().each(function(i) {
-
-				var that = $(this), li, config = {};
-
-				if (that.is("option")) {
-
-					getOptions(that);
-
-				} else if (that.is("optgroup")) {
-
-					li = $("<li>");
-
-					$("<span>", {
-
-						"text": that.attr("label")
-
-					}).addClass(inst.settings.classGroup).appendTo(li);
-
-					li.appendTo(sbOptions);
-
-					if (that.is(":disabled")) {
-
-						config.disabled = true;
-
-					}
-
-					config.sub = true;
-
-					getOptions(that.find("option"), config);
-
-				}
-
-			});
-
-			
-
-			function getOptions () {
-
-				var sub = arguments[1] && arguments[1].sub ? true : false,
-
-					disabled = arguments[1] && arguments[1].disabled ? true : false;
-
-				arguments[0].each(function (i) {
-
-					var that = $(this),
-
-						li = $("<li>"),
-
-						child;
-
-					if (that.is(":selected")) {
-
-						sbSelector.text(that.text());
-
-						s = TRUE;
-
-					}
-
-					if (i === olen - 1) {
-
-						li.addClass("last");
-
-					}
-
-					if (!that.is(":disabled") && !disabled) {
-
-						child = $("<a>", {
-
-							"href": "#" + that.val(),
-
-							"rel": that.val()
-
-						}).text(that.text()).bind("click.sb", function (e) {
-
-							if (e && e.preventDefault) {
-
-								e.preventDefault();
-
-							}
-
-							var t = sbToggle,
-
-							 	$this = $(this),
-
-								uid = t.attr("id").split("_")[1];
-
-							self._changeSelectbox(target, $this.attr("rel"), $this.text());
-
-							self._closeSelectbox(target);
-
-						}).bind("mouseover.sb", function () {
-
-							var $this = $(this);
-
-							$this.parent().siblings().find("a").removeClass(inst.settings.classFocus);
-
-							$this.addClass(inst.settings.classFocus);
-
-						}).bind("mouseout.sb", function () {
-
-							$(this).removeClass(inst.settings.classFocus);
-
-						});
-
-						if (sub) {
-
-							child.addClass(inst.settings.classSub);
-
-						}
-
-						if (that.is(":selected")) {
-
-							child.addClass(inst.settings.classFocus);
-
-						}
-
-						child.appendTo(li);
-
-					} else {
-
-						child = $("<span>", {
-
-							"text": that.text()
-
-						}).addClass(inst.settings.classDisabled);
-
-						if (sub) {
-
-							child.addClass(inst.settings.classSub);
-
-						}
-
-						child.appendTo(li);
-
-					}
-
-					li.appendTo(sbOptions);
-
-				});
-
-			}
-
-			
-
-			if (!s) {
-
-				sbSelector.text(opts.first().text());
-
-			}
-
-
-
-			$.data(target, PROP_NAME, inst);
-
-			
-
-			sbHolder.data("uid", inst.uid).bind("keydown.sb", function (e) {
-
-				var key = e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0,
-
-					$this = $(this),
-
-					uid = $this.data("uid"),
-
-					inst = $this.siblings("select[sb='"+uid+"']").data(PROP_NAME),
-
-					trgt = $this.siblings(["select[sb='", uid, "']"].join("")).get(0),
-
-					$f = $this.find("ul").find("a." + inst.settings.classFocus);
-
-				switch (key) {
-
-					case 37: //Arrow Left
-
-					case 38: //Arrow Up
-
-						if ($f.length > 0) {
-
-							var $next;
-
-							$("a", $this).removeClass(inst.settings.classFocus);
-
-							$next = $f.parent().prevAll("li:has(a)").eq(0).find("a");
-
-							if ($next.length > 0) {
-
-								//$next.addClass(inst.settings.classFocus).focus();
-
-								$("#sbSelector_" + uid).text($next.text());
-
-							}
-
-						}
-
-						break;
-
-					case 39: //Arrow Right
-
-					case 40: //Arrow Down
-
-						var $next;
-
-						$("a", $this).removeClass(inst.settings.classFocus);
-
-						if ($f.length > 0) {
-
-							$next = $f.parent().nextAll("li:has(a)").eq(0).find("a");
-
-						} else {
-
-							$next = $this.find("ul").find("a").eq(0);
-
-						}
-
-						if ($next.length > 0) {
-
-							//$next.addClass(inst.settings.classFocus).focus();
-
-							$("#sbSelector_" + uid).text($next.text());
-
-						}
-
-						break;				
-
-					case 13: //Enter
-
-						if ($f.length > 0) {
-
-							self._changeSelectbox(trgt, $f.attr("rel"), $f.text());
-
-						}
-
-						self._closeSelectbox(trgt);
-
-						break;
-
-					case 9: //Tab
-
-						if (trgt) {
-
-							var inst = self._getInst(trgt);
-
-							if (inst/* && inst.isOpen*/) {
-
-								if ($f.length > 0) {
-
-									self._changeSelectbox(trgt, $f.attr("rel"), $f.text());
-
-								}
-
-								self._closeSelectbox(trgt);
-
-							}
-
-						}
-
-						var i = parseInt($this.attr("tabindex"), 10);
-
-						if (!e.shiftKey) {
-
-							i++;
-
-						} else {
-
-							i--;
-
-						}
-
-						$("*[tabindex='" + i + "']").focus();
-
-						break;
-
-					case 27: //Escape
-
-						self._closeSelectbox(trgt);
-
-						break;
-
-				}
-
-				e.stopPropagation();
-
-				return false;
-
-			}).delegate("a", "mouseover", function (e) {
-
-				$(this).addClass(inst.settings.classFocus);
-
-			}).delegate("a", "mouseout", function (e) {
-
-				$(this).removeClass(inst.settings.classFocus);	
-
-			});
-
-			
-
-			sbSelector.appendTo(sbHolder);
-
-			sbOptions.appendTo(sbHolder);			
-
-			sbHolder.insertAfter($target);
-
-			
-
-			$("html").live('mousedown', function(e) {
-
-				e.stopPropagation();          
-
-				$("select").selectbox('close'); 
-
-			});
-
-			$([".", inst.settings.classHolder, ", .", inst.settings.classSelector].join("")).mousedown(function(e) {    
-
-				e.stopPropagation();
-
-			});
-
-		},
-
-		/**
-
-		 * Remove the selectbox functionality completely. This will return the element back to its pre-init state.
-
-		 * 
-
-		 * @param {HTMLElement} target
-
-		 */
-
-		_detachSelectbox: function (target) {
-
-			var inst = this._getInst(target);
-
-			if (!inst) {
-
-				return FALSE;
-
-			}
-
-			$("#sbHolder_" + inst.uid).remove();
-
-			$.data(target, PROP_NAME, null);
-
-			$(target).show();			
-
-		},
-
-		/**
-
-		 * Change selected attribute of the selectbox.
-
-		 * 
-
-		 * @param {HTMLElement} target
-
-		 * @param {String} value
-
-		 * @param {String} text
-
-		 */
-
-		_changeSelectbox: function (target, value, text) {
-
-			var onChange,
-
-				inst = this._getInst(target);
-
-			if (inst) {
-
-				onChange = this._get(inst, 'onChange');
-
-				$("#sbSelector_" + inst.uid).text(text);
-
-			}
-
-			value = value.replace(/\'/g, "\\'");
-
-			$(target).find("option[value='" + value + "']").attr("selected", TRUE);
-
-			if (inst && onChange) {
-
-				onChange.apply((inst.input ? inst.input[0] : null), [value, inst]);
-
-			} else if (inst && inst.input) {
-
-				inst.input.trigger('change');
-
-			}
-
-            $("#search_input").val(value);
-
-		},
-
-		/**
-
-		 * Enable the selectbox.
-
-		 * 
-
-		 * @param {HTMLElement} target
-
-		 */
-
-		_enableSelectbox: function (target) {
-
-			var inst = this._getInst(target);
-
-			if (!inst || !inst.isDisabled) {
-
-				return FALSE;
-
-			}
-
-			$("#sbHolder_" + inst.uid).removeClass(inst.settings.classHolderDisabled);
-
-			inst.isDisabled = FALSE;
-
-			$.data(target, PROP_NAME, inst);
-
-		},
-
-		/**
-
-		 * Disable the selectbox.
-
-		 * 
-
-		 * @param {HTMLElement} target
-
-		 */
-
-		_disableSelectbox: function (target) {
-
-			var inst = this._getInst(target);
-
-			if (!inst || inst.isDisabled) {
-
-				return FALSE;
-
-			}
-
-			$("#sbHolder_" + inst.uid).addClass(inst.settings.classHolderDisabled);
-
-			inst.isDisabled = TRUE;
-
-			$.data(target, PROP_NAME, inst);
-
-		},
-
-		/**
-
-		 * Get or set any selectbox option. If no value is specified, will act as a getter.
-
-		 * 
-
-		 * @param {HTMLElement} target
-
-		 * @param {String} name
-
-		 * @param {Object} value
-
-		 */
-
-		_optionSelectbox: function (target, name, value) {
-
-			var inst = this._getInst(target);
-
-			if (!inst) {
-
-				return FALSE;
-
-			}
-
-			//TODO check name
-
-			inst[name] = value;
-
-			$.data(target, PROP_NAME, inst);
-
-		},
-
-		/**
-
-		 * Call up attached selectbox
-
-		 * 
-
-		 * @param {HTMLElement} target
-
-		 */
-
-		_openSelectbox: function (target) {
-
-			var inst = this._getInst(target);
-
-			//if (!inst || this._state[inst.uid] || inst.isDisabled) {
-
-			if (!inst || inst.isOpen || inst.isDisabled) {
-
-				return;
-
-			}
-
-			var	el = $("#sbOptions_" + inst.uid),
-
-				viewportHeight = parseInt($(window).height(), 10),
-
-				offset = $("#sbHolder_" + inst.uid).offset(),
-
-				scrollTop = $(window).scrollTop(),
-
-				height = el.prev().height(),
-
-				diff = viewportHeight - (offset.top - scrollTop) - height / 2,
-
-				onOpen = this._get(inst, 'onOpen');
-
-			el.css({
-
-				"top": height + "px",
-
-				"maxHeight": (diff - height) + "px"
-
-			});
-
-			inst.settings.effect === "fade" ? el.fadeIn(inst.settings.speed) : el.slideDown(inst.settings.speed);
-
-			$("#sbToggle_" + inst.uid).addClass(inst.settings.classToggleOpen);
-
-			this._state[inst.uid] = TRUE;
-
-			inst.isOpen = TRUE;
-
-			if (onOpen) {
-
-				onOpen.apply((inst.input ? inst.input[0] : null), [inst]);
-
-			}
-
-			$.data(target, PROP_NAME, inst);
-
-		},
-
-		/**
-
-		 * Close opened selectbox
-
-		 * 
-
-		 * @param {HTMLElement} target
-
-		 */
-
-		_closeSelectbox: function (target) {
-
-			var inst = this._getInst(target);
-
-			//if (!inst || !this._state[inst.uid]) {
-
-			if (!inst || !inst.isOpen) {
-
-				return;
-
-			}
-
-			var onClose = this._get(inst, 'onClose');
-
-			inst.settings.effect === "fade" ? $("#sbOptions_" + inst.uid).fadeOut(inst.settings.speed) : $("#sbOptions_" + inst.uid).slideUp(inst.settings.speed);
-
-			$("#sbToggle_" + inst.uid).removeClass(inst.settings.classToggleOpen);
-
-			this._state[inst.uid] = FALSE;
-
-			inst.isOpen = FALSE;
-
-			if (onClose) {
-
-				onClose.apply((inst.input ? inst.input[0] : null), [inst]);
-
-			}
-
-			$.data(target, PROP_NAME, inst);
-
-		},
-
-		/**
-
-		 * Create a new instance object
-
-		 * 
-
-		 * @param {HTMLElement} target
-
-		 * @return {Object}
-
-		 */
-
-		_newInst: function(target) {
-
-			var id = target[0].id.replace(/([^A-Za-z0-9_-])/g, '\\\\$1');
-
-			return {
-
-				id: id, 
-
-				input: target, 
-
-				uid: Math.floor(Math.random() * 99999999),
-
-				isOpen: FALSE,
-
-				isDisabled: FALSE,
-
-				settings: {}
-
-			}; 
-
-		},
-
-		/**
-
-		 * Retrieve the instance data for the target control.
-
-		 * 
-
-		 * @param {HTMLElement} target
-
-		 * @return {Object} - the associated instance data
-
-		 * @throws error if a jQuery problem getting data
-
-		 */
-
-		_getInst: function(target) {
-
-			try {
-
-				return $.data(target, PROP_NAME);
-
-			}
-
-			catch (err) {
-
-				throw 'Missing instance data for this selectbox';
-
-			}
-
-		},
-
-		/**
-
-		 * Get a setting value, defaulting if necessary
-
-		 * 
-
-		 * @param {Object} inst
-
-		 * @param {String} name
-
-		 * @return {Mixed}
-
-		 */
-
-		_get: function(inst, name) {
-
-			return inst.settings[name] !== undefined ? inst.settings[name] : this._defaults[name];
-
-		}
-
-	});
-
-
-
-	/**
-
-	 * Invoke the selectbox functionality.
-
-	 *
-
-	 * @param {Object|String} options
-
-	 * @return {Object}
-
-	 */
-
-	$.fn.selectbox = function (options) {
-
-		
-
-		var otherArgs = Array.prototype.slice.call(arguments, 1);
-
-		if (typeof options == 'string' && options == 'isDisabled') {
-
-			return $.selectbox['_' + options + 'Selectbox'].apply($.selectbox, [this[0]].concat(otherArgs));
-
-		}
-
-		
-
-		if (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string') {
-
-			return $.selectbox['_' + options + 'Selectbox'].apply($.selectbox, [this[0]].concat(otherArgs));
-
-		}
-
-		
-
-		return this.each(function() {
-
-			typeof options == 'string' ?
-
-				$.selectbox['_' + options + 'Selectbox'].apply($.selectbox, [this].concat(otherArgs)) :
-
-				$.selectbox._attachSelectbox(this, options);
-
-		});
-
-	};
-
-	
-
-	$.selectbox = new Selectbox(); // singleton instance
-
-	$.selectbox.version = "0.2";
-
-})(jQuery);
-
-
-
+/*!
+
+ * jQuery Selectbox plugin 0.2
+
+ *
+
+ * Copyright 2011-2012, Dimitar Ivanov (http://www.bulgaria-web-developers.com/projects/javascript/selectbox/)
+
+ * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
+
+ * 
+
+ * Date: Tue Jul 17 19:58:36 2012 +0300
+
+ */
+
+(function ($, undefined) {
+
+	var PROP_NAME = 'selectbox',
+
+		FALSE = false,
+
+		TRUE = true;
+
+	/**
+
+	 * Selectbox manager.
+
+	 * Use the singleton instance of this class, $.selectbox, to interact with the select box.
+
+	 * Settings for (groups of) select boxes are maintained in an instance object,
+
+	 * allowing multiple different settings on the same page
+
+	 */
+
+	function Selectbox() {
+
+		this._state = [];
+
+		this._defaults = { // Global defaults for all the select box instances
+
+			classHolder: "sbHolder",
+
+			classHolderDisabled: "sbHolderDisabled",
+
+			classSelector: "sbSelector",
+
+			classOptions: "sbOptions",
+
+			classGroup: "sbGroup",
+
+			classSub: "sbSub",
+
+			classDisabled: "sbDisabled",
+
+			classToggleOpen: "sbToggleOpen",
+
+			classToggle: "sbToggle",
+
+			classFocus: "sbFocus",
+
+			speed: 200,
+
+			effect: "slide", // "slide" or "fade"
+
+			onChange: null, //Define a callback function when the selectbox is changed
+
+			onOpen: null, //Define a callback function when the selectbox is open
+
+			onClose: null //Define a callback function when the selectbox is closed
+
+		};
+
+	}
+
+	
+
+	$.extend(Selectbox.prototype, {
+
+		/**
+
+		 * Is the first field in a jQuery collection open as a selectbox
+
+		 * 
+
+		 * @param {Object} target
+
+		 * @return {Boolean}
+
+		 */
+
+		_isOpenSelectbox: function (target) {
+
+			if (!target) {
+
+				return FALSE;
+
+			}
+
+			var inst = this._getInst(target);
+
+			return inst.isOpen;
+
+		},
+
+		/**
+
+		 * Is the first field in a jQuery collection disabled as a selectbox
+
+		 * 
+
+		 * @param {HTMLElement} target
+
+		 * @return {Boolean}
+
+		 */
+
+		_isDisabledSelectbox: function (target) {
+
+			if (!target) {
+
+				return FALSE;
+
+			}
+
+			var inst = this._getInst(target);
+
+			return inst.isDisabled;
+
+		},
+
+		/**
+
+		 * Attach the select box to a jQuery selection.
+
+		 * 
+
+		 * @param {HTMLElement} target
+
+		 * @param {Object} settings
+
+		 */
+
+		_attachSelectbox: function (target, settings) {
+
+			if (this._getInst(target)) {
+
+				return FALSE;
+
+			}
+
+			var $target = $(target),
+
+				self = this,
+
+				inst = self._newInst($target),
+
+				sbHolder, sbSelector, sbToggle, sbOptions,
+
+				s = FALSE, optGroup = $target.find("optgroup"), opts = $target.find("option"), olen = opts.length;
+
+				
+
+			$target.attr("sb", inst.uid);
+
+				
+
+			$.extend(inst.settings, self._defaults, settings);
+
+			self._state[inst.uid] = FALSE;
+
+			$target.hide();
+
+			
+
+			function closeOthers() {
+
+				var key, sel,
+
+					uid = this.attr("id").split("_")[1];
+
+				for (key in self._state) {
+
+					if (key !== uid) {
+
+						if (self._state.hasOwnProperty(key)) {
+
+							sel = $("select[sb='" + key + "']")[0];
+
+							if (sel) {
+
+								self._closeSelectbox(sel);
+
+							}
+
+						}
+
+					}
+
+				}
+
+			}
+
+			
+
+			sbHolder = $("<div>", {
+
+				"id": "sbHolder_" + inst.uid,
+
+				"class": inst.settings.classHolder,
+
+				"tabindex": $target.attr("tabindex")
+
+			});
+
+			
+
+			sbSelector = $("<a>", {
+
+				"id": "sbSelector_" + inst.uid,
+
+				"href": "#",
+
+				"class": inst.settings.classSelector,
+
+				"click": function (e) {
+
+					e.preventDefault();
+
+					closeOthers.apply($(this), []);
+
+					var uid = $(this).attr("id").split("_")[1];
+
+					if (self._state[uid]) {
+
+						self._closeSelectbox(target);
+
+					} else {
+
+						self._openSelectbox(target);
+
+					}
+
+				}
+
+			});
+
+			
+
+			sbToggle = $("<a>", {
+
+				"id": "sbToggle_" + inst.uid,
+
+				"href": "#",
+
+				"class": inst.settings.classToggle,
+
+				"click": function (e) {
+
+					e.preventDefault();
+
+					closeOthers.apply($(this), []);
+
+					var uid = $(this).attr("id").split("_")[1];
+
+					if (self._state[uid]) {
+
+						self._closeSelectbox(target);
+
+					} else {
+
+						self._openSelectbox(target);
+
+					}
+
+				}
+
+			});
+
+			sbToggle.appendTo(sbHolder);
+
+
+
+			sbOptions = $("<ul>", {
+
+				"id": "sbOptions_" + inst.uid,
+
+				"class": inst.settings.classOptions,
+
+				"css": {
+
+					"display": "none"
+
+				}
+
+			});
+
+			
+
+			$target.children().each(function(i) {
+
+				var that = $(this), li, config = {};
+
+				if (that.is("option")) {
+
+					getOptions(that);
+
+				} else if (that.is("optgroup")) {
+
+					li = $("<li>");
+
+					$("<span>", {
+
+						"text": that.attr("label")
+
+					}).addClass(inst.settings.classGroup).appendTo(li);
+
+					li.appendTo(sbOptions);
+
+					if (that.is(":disabled")) {
+
+						config.disabled = true;
+
+					}
+
+					config.sub = true;
+
+					getOptions(that.find("option"), config);
+
+				}
+
+			});
+
+			
+
+			function getOptions () {
+
+				var sub = arguments[1] && arguments[1].sub ? true : false,
+
+					disabled = arguments[1] && arguments[1].disabled ? true : false;
+
+				arguments[0].each(function (i) {
+
+					var that = $(this),
+
+						li = $("<li>"),
+
+						child;
+
+					if (that.is(":selected")) {
+
+						sbSelector.text(that.text());
+
+						s = TRUE;
+
+					}
+
+					if (i === olen - 1) {
+
+						li.addClass("last");
+
+					}
+
+					if (!that.is(":disabled") && !disabled) {
+
+						child = $("<a>", {
+
+							"href": "#" + that.val(),
+
+							"rel": that.val()
+
+						}).text(that.text()).bind("click.sb", function (e) {
+
+							if (e && e.preventDefault) {
+
+								e.preventDefault();
+
+							}
+
+							var t = sbToggle,
+
+							 	$this = $(this),
+
+								uid = t.attr("id").split("_")[1];
+
+							self._changeSelectbox(target, $this.attr("rel"), $this.text());
+
+							self._closeSelectbox(target);
+
+						}).bind("mouseover.sb", function () {
+
+							var $this = $(this);
+
+							$this.parent().siblings().find("a").removeClass(inst.settings.classFocus);
+
+							$this.addClass(inst.settings.classFocus);
+
+						}).bind("mouseout.sb", function () {
+
+							$(this).removeClass(inst.settings.classFocus);
+
+						});
+
+						if (sub) {
+
+							child.addClass(inst.settings.classSub);
+
+						}
+
+						if (that.is(":selected")) {
+
+							child.addClass(inst.settings.classFocus);
+
+						}
+
+						child.appendTo(li);
+
+					} else {
+
+						child = $("<span>", {
+
+							"text": that.text()
+
+						}).addClass(inst.settings.classDisabled);
+
+						if (sub) {
+
+							child.addClass(inst.settings.classSub);
+
+						}
+
+						child.appendTo(li);
+
+					}
+
+					li.appendTo(sbOptions);
+
+				});
+
+			}
+
+			
+
+			if (!s) {
+
+				sbSelector.text(opts.first().text());
+
+			}
+
+
+
+			$.data(target, PROP_NAME, inst);
+
+			
+
+			sbHolder.data("uid", inst.uid).bind("keydown.sb", function (e) {
+
+				var key = e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0,
+
+					$this = $(this),
+
+					uid = $this.data("uid"),
+
+					inst = $this.siblings("select[sb='"+uid+"']").data(PROP_NAME),
+
+					trgt = $this.siblings(["select[sb='", uid, "']"].join("")).get(0),
+
+					$f = $this.find("ul").find("a." + inst.settings.classFocus);
+
+				switch (key) {
+
+					case 37: //Arrow Left
+
+					case 38: //Arrow Up
+
+						if ($f.length > 0) {
+
+							var $next;
+
+							$("a", $this).removeClass(inst.settings.classFocus);
+
+							$next = $f.parent().prevAll("li:has(a)").eq(0).find("a");
+
+							if ($next.length > 0) {
+
+								//$next.addClass(inst.settings.classFocus).focus();
+
+								$("#sbSelector_" + uid).text($next.text());
+
+							}
+
+						}
+
+						break;
+
+					case 39: //Arrow Right
+
+					case 40: //Arrow Down
+
+						var $next;
+
+						$("a", $this).removeClass(inst.settings.classFocus);
+
+						if ($f.length > 0) {
+
+							$next = $f.parent().nextAll("li:has(a)").eq(0).find("a");
+
+						} else {
+
+							$next = $this.find("ul").find("a").eq(0);
+
+						}
+
+						if ($next.length > 0) {
+
+							//$next.addClass(inst.settings.classFocus).focus();
+
+							$("#sbSelector_" + uid).text($next.text());
+
+						}
+
+						break;				
+
+					case 13: //Enter
+
+						if ($f.length > 0) {
+
+							self._changeSelectbox(trgt, $f.attr("rel"), $f.text());
+
+						}
+
+						self._closeSelectbox(trgt);
+
+						break;
+
+					case 9: //Tab
+
+						if (trgt) {
+
+							var inst = self._getInst(trgt);
+
+							if (inst/* && inst.isOpen*/) {
+
+								if ($f.length > 0) {
+
+									self._changeSelectbox(trgt, $f.attr("rel"), $f.text());
+
+								}
+
+								self._closeSelectbox(trgt);
+
+							}
+
+						}
+
+						var i = parseInt($this.attr("tabindex"), 10);
+
+						if (!e.shiftKey) {
+
+							i++;
+
+						} else {
+
+							i--;
+
+						}
+
+						$("*[tabindex='" + i + "']").focus();
+
+						break;
+
+					case 27: //Escape
+
+						self._closeSelectbox(trgt);
+
+						break;
+
+				}
+
+				e.stopPropagation();
+
+				return false;
+
+			}).delegate("a", "mouseover", function (e) {
+
+				$(this).addClass(inst.settings.classFocus);
+
+			}).delegate("a", "mouseout", function (e) {
+
+				$(this).removeClass(inst.settings.classFocus);	
+
+			});
+
+			
+
+			sbSelector.appendTo(sbHolder);
+
+			sbOptions.appendTo(sbHolder);			
+
+			sbHolder.insertAfter($target);
+
+			
+
+			$("html").live('mousedown', function(e) {
+
+				e.stopPropagation();          
+
+				$("select").selectbox('close'); 
+
+			});
+
+			$([".", inst.settings.classHolder, ", .", inst.settings.classSelector].join("")).mousedown(function(e) {    
+
+				e.stopPropagation();
+
+			});
+
+		},
+
+		/**
+
+		 * Remove the selectbox functionality completely. This will return the element back to its pre-init state.
+
+		 * 
+
+		 * @param {HTMLElement} target
+
+		 */
+
+		_detachSelectbox: function (target) {
+
+			var inst = this._getInst(target);
+
+			if (!inst) {
+
+				return FALSE;
+
+			}
+
+			$("#sbHolder_" + inst.uid).remove();
+
+			$.data(target, PROP_NAME, null);
+
+			$(target).show();			
+
+		},
+
+		/**
+
+		 * Change selected attribute of the selectbox.
+
+		 * 
+
+		 * @param {HTMLElement} target
+
+		 * @param {String} value
+
+		 * @param {String} text
+
+		 */
+
+		_changeSelectbox: function (target, value, text) {
+
+			var onChange,
+
+				inst = this._getInst(target);
+
+			if (inst) {
+
+				onChange = this._get(inst, 'onChange');
+
+				$("#sbSelector_" + inst.uid).text(text);
+
+			}
+
+			value = value.replace(/\'/g, "\\'");
+
+			$(target).find("option[value='" + value + "']").attr("selected", TRUE);
+
+			if (inst && onChange) {
+
+				onChange.apply((inst.input ? inst.input[0] : null), [value, inst]);
+
+			} else if (inst && inst.input) {
+
+				inst.input.trigger('change');
+
+			}
+
+            $("#search_input").val(value);
+
+		},
+
+		/**
+
+		 * Enable the selectbox.
+
+		 * 
+
+		 * @param {HTMLElement} target
+
+		 */
+
+		_enableSelectbox: function (target) {
+
+			var inst = this._getInst(target);
+
+			if (!inst || !inst.isDisabled) {
+
+				return FALSE;
+
+			}
+
+			$("#sbHolder_" + inst.uid).removeClass(inst.settings.classHolderDisabled);
+
+			inst.isDisabled = FALSE;
+
+			$.data(target, PROP_NAME, inst);
+
+		},
+
+		/**
+
+		 * Disable the selectbox.
+
+		 * 
+
+		 * @param {HTMLElement} target
+
+		 */
+
+		_disableSelectbox: function (target) {
+
+			var inst = this._getInst(target);
+
+			if (!inst || inst.isDisabled) {
+
+				return FALSE;
+
+			}
+
+			$("#sbHolder_" + inst.uid).addClass(inst.settings.classHolderDisabled);
+
+			inst.isDisabled = TRUE;
+
+			$.data(target, PROP_NAME, inst);
+
+		},
+
+		/**
+
+		 * Get or set any selectbox option. If no value is specified, will act as a getter.
+
+		 * 
+
+		 * @param {HTMLElement} target
+
+		 * @param {String} name
+
+		 * @param {Object} value
+
+		 */
+
+		_optionSelectbox: function (target, name, value) {
+
+			var inst = this._getInst(target);
+
+			if (!inst) {
+
+				return FALSE;
+
+			}
+
+			//TODO check name
+
+			inst[name] = value;
+
+			$.data(target, PROP_NAME, inst);
+
+		},
+
+		/**
+
+		 * Call up attached selectbox
+
+		 * 
+
+		 * @param {HTMLElement} target
+
+		 */
+
+		_openSelectbox: function (target) {
+
+			var inst = this._getInst(target);
+
+			//if (!inst || this._state[inst.uid] || inst.isDisabled) {
+
+			if (!inst || inst.isOpen || inst.isDisabled) {
+
+				return;
+
+			}
+
+			var	el = $("#sbOptions_" + inst.uid),
+
+				viewportHeight = parseInt($(window).height(), 10),
+
+				offset = $("#sbHolder_" + inst.uid).offset(),
+
+				scrollTop = $(window).scrollTop(),
+
+				height = el.prev().height(),
+
+				diff = viewportHeight - (offset.top - scrollTop) - height / 2,
+
+				onOpen = this._get(inst, 'onOpen');
+
+			el.css({
+
+				"top": height + "px",
+
+				"maxHeight": (diff - height) + "px"
+
+			});
+
+			inst.settings.effect === "fade" ? el.fadeIn(inst.settings.speed) : el.slideDown(inst.settings.speed);
+
+			$("#sbToggle_" + inst.uid).addClass(inst.settings.classToggleOpen);
+
+			this._state[inst.uid] = TRUE;
+
+			inst.isOpen = TRUE;
+
+			if (onOpen) {
+
+				onOpen.apply((inst.input ? inst.input[0] : null), [inst]);
+
+			}
+
+			$.data(target, PROP_NAME, inst);
+
+		},
+
+		/**
+
+		 * Close opened selectbox
+
+		 * 
+
+		 * @param {HTMLElement} target
+
+		 */
+
+		_closeSelectbox: function (target) {
+
+			var inst = this._getInst(target);
+
+			//if (!inst || !this._state[inst.uid]) {
+
+			if (!inst || !inst.isOpen) {
+
+				return;
+
+			}
+
+			var onClose = this._get(inst, 'onClose');
+
+			inst.settings.effect === "fade" ? $("#sbOptions_" + inst.uid).fadeOut(inst.settings.speed) : $("#sbOptions_" + inst.uid).slideUp(inst.settings.speed);
+
+			$("#sbToggle_" + inst.uid).removeClass(inst.settings.classToggleOpen);
+
+			this._state[inst.uid] = FALSE;
+
+			inst.isOpen = FALSE;
+
+			if (onClose) {
+
+				onClose.apply((inst.input ? inst.input[0] : null), [inst]);
+
+			}
+
+			$.data(target, PROP_NAME, inst);
+
+		},
+
+		/**
+
+		 * Create a new instance object
+
+		 * 
+
+		 * @param {HTMLElement} target
+
+		 * @return {Object}
+
+		 */
+
+		_newInst: function(target) {
+
+			var id = target[0].id.replace(/([^A-Za-z0-9_-])/g, '\\\\$1');
+
+			return {
+
+				id: id, 
+
+				input: target, 
+
+				uid: Math.floor(Math.random() * 99999999),
+
+				isOpen: FALSE,
+
+				isDisabled: FALSE,
+
+				settings: {}
+
+			}; 
+
+		},
+
+		/**
+
+		 * Retrieve the instance data for the target control.
+
+		 * 
+
+		 * @param {HTMLElement} target
+
+		 * @return {Object} - the associated instance data
+
+		 * @throws error if a jQuery problem getting data
+
+		 */
+
+		_getInst: function(target) {
+
+			try {
+
+				return $.data(target, PROP_NAME);
+
+			}
+
+			catch (err) {
+
+				throw 'Missing instance data for this selectbox';
+
+			}
+
+		},
+
+		/**
+
+		 * Get a setting value, defaulting if necessary
+
+		 * 
+
+		 * @param {Object} inst
+
+		 * @param {String} name
+
+		 * @return {Mixed}
+
+		 */
+
+		_get: function(inst, name) {
+
+			return inst.settings[name] !== undefined ? inst.settings[name] : this._defaults[name];
+
+		}
+
+	});
+
+
+
+	/**
+
+	 * Invoke the selectbox functionality.
+
+	 *
+
+	 * @param {Object|String} options
+
+	 * @return {Object}
+
+	 */
+
+	$.fn.selectbox = function (options) {
+
+		
+
+		var otherArgs = Array.prototype.slice.call(arguments, 1);
+
+		if (typeof options == 'string' && options == 'isDisabled') {
+
+			return $.selectbox['_' + options + 'Selectbox'].apply($.selectbox, [this[0]].concat(otherArgs));
+
+		}
+
+		
+
+		if (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string') {
+
+			return $.selectbox['_' + options + 'Selectbox'].apply($.selectbox, [this[0]].concat(otherArgs));
+
+		}
+
+		
+
+		return this.each(function() {
+
+			typeof options == 'string' ?
+
+				$.selectbox['_' + options + 'Selectbox'].apply($.selectbox, [this].concat(otherArgs)) :
+
+				$.selectbox._attachSelectbox(this, options);
+
+		});
+
+	};
+
+	
+
+	$.selectbox = new Selectbox(); // singleton instance
+
+	$.selectbox.version = "0.2";
+
+})(jQuery);
+
+
+
Index: E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/js/cloud-zoom.1.0.2.js
===================================================================
--- E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/js/cloud-zoom.1.0.2.js	(revision 8)
+++ E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/js/cloud-zoom.1.0.2.js	(revision 9)
@@ -1,391 +1,391 @@
-//////////////////////////////////////////////////////////////////////////////////
-// Cloud Zoom V1.0.2
-// (c) 2010 by R Cecco. <http://www.professorcloud.com>
-// MIT License
-//
-// Please retain this copyright header in all versions of the software
-//////////////////////////////////////////////////////////////////////////////////
-(function ($) {
-
-    $(document).ready(function () {
-        $('.cloud-zoom, .cloud-zoom-gallery').CloudZoom();
-    });
-
-    function format(str) {
-        for (var i = 1; i < arguments.length; i++) {
-            str = str.replace('%' + (i - 1), arguments[i]);
-        }
-        return str;
-    }
-
-    function CloudZoom(jWin, opts) {
-        var sImg = $('img', jWin);
-		var	img1;
-		var	img2;
-        var zoomDiv = null;
-		var	$mouseTrap = null;
-		var	lens = null;
-		var	$tint = null;
-		var	softFocus = null;
-		var	$ie6Fix = null;
-		var	zoomImage;
-        var controlTimer = 0;      
-        var cw, ch;
-        var destU = 0;
-		var	destV = 0;
-        var currV = 0;
-        var currU = 0;      
-        var filesLoaded = 0;
-        var mx,
-            my; 
-        var ctx = this, zw;
-        // Display an image loading message. This message gets deleted when the images have loaded and the zoom init function is called.
-        // We add a small delay before the message is displayed to avoid the message flicking on then off again virtually immediately if the
-        // images load really fast, e.g. from the cache. 
-        //var	ctx = this;
-        setTimeout(function () {
-            //						 <img src="/images/loading.gif"/>
-            if ($mouseTrap === null) {
-                var w = jWin.width();
-                jWin.parent().append(format('<div style="width:%0px;position:absolute;top:75%;left:%1px;text-align:center" class="cloud-zoom-loading" >Loading...</div>', w / 3, (w / 2) - (w / 6))).find(':last').css('opacity', 0.5);
-            }
-        }, 200);
-
-
-        var ie6FixRemove = function () {
-
-            if ($ie6Fix !== null) {
-                $ie6Fix.remove();
-                $ie6Fix = null;
-            }
-        };
-
-        // Removes cursor, tint layer, blur layer etc.
-        this.removeBits = function () {
-            //$mouseTrap.unbind();
-            if (lens) {
-                lens.remove();
-                lens = null;             
-            }
-            if ($tint) {
-                $tint.remove();
-                $tint = null;
-            }
-            if (softFocus) {
-                softFocus.remove();
-                softFocus = null;
-            }
-            ie6FixRemove();
-
-            $('.cloud-zoom-loading', jWin.parent()).remove();
-        };
-
-
-        this.destroy = function () {
-            jWin.data('zoom', null);
-
-            if ($mouseTrap) {
-                $mouseTrap.unbind();
-                $mouseTrap.remove();
-                $mouseTrap = null;
-            }
-            if (zoomDiv) {
-                zoomDiv.remove();
-                zoomDiv = null;
-            }
-            //ie6FixRemove();
-            this.removeBits();
-            // DON'T FORGET TO REMOVE JQUERY 'DATA' VALUES
-        };
-
-
-        // This is called when the zoom window has faded out so it can be removed.
-        this.fadedOut = function () {
-            
-			if (zoomDiv) {
-                zoomDiv.remove();
-                zoomDiv = null;
-            }
-			 this.removeBits();
-            //ie6FixRemove();
-        };
-
-        this.controlLoop = function () {
-            if (lens) {
-                var x = (mx - sImg.offset().left - (cw * 0.5)) >> 0;
-                var y = (my - sImg.offset().top - (ch * 0.5)) >> 0;
-               
-                if (x < 0) {
-                    x = 0;
-                }
-                else if (x > (sImg.outerWidth() - cw)) {
-                    x = (sImg.outerWidth() - cw);
-                }
-                if (y < 0) {
-                    y = 0;
-                }
-                else if (y > (sImg.outerHeight() - ch)) {
-                    y = (sImg.outerHeight() - ch);
-                }
-
-                lens.css({
-                    left: x,
-                    top: y
-                });
-                lens.css('background-position', (-x) + 'px ' + (-y) + 'px');
-
-                destU = (((x) / sImg.outerWidth()) * zoomImage.width) >> 0;
-                destV = (((y) / sImg.outerHeight()) * zoomImage.height) >> 0;
-                currU += (destU - currU) / opts.smoothMove;
-                currV += (destV - currV) / opts.smoothMove;
-
-                zoomDiv.css('background-position', (-(currU >> 0) + 'px ') + (-(currV >> 0) + 'px'));              
-            }
-            controlTimer = setTimeout(function () {
-                ctx.controlLoop();
-            }, 30);
-        };
-
-        this.init2 = function (img, id) {
-
-            filesLoaded++;
-            //console.log(img.src + ' ' + id + ' ' + img.width);	
-            if (id === 1) {
-                zoomImage = img;
-            }
-            //this.images[id] = img;
-            if (filesLoaded === 2) {
-                this.init();
-            }
-        };
-
-        /* Init function start.  */
-        this.init = function () {
-            // Remove loading message (if present);
-            $('.cloud-zoom-loading', jWin.parent()).remove();
-
-
-/* Add a box (mouseTrap) over the small image to trap mouse events.
-		It has priority over zoom window to avoid issues with inner zoom.
-		We need the dummy background image as IE does not trap mouse events on
-		transparent parts of a div.
-		*/
-            $mouseTrap = jWin.parent().append(format("<div class='mousetrap' style='background-image:url(\".\");background-repeat:no-repeat;z-index:999;position:absolute;width:%0px;height:%1px;left:%2px;top:%3px;\'></div>", sImg.outerWidth(), sImg.outerHeight(), 0, 0)).find(':last');
-
-            //////////////////////////////////////////////////////////////////////			
-            /* Do as little as possible in mousemove event to prevent slowdown. */
-            $mouseTrap.bind('mousemove', this, function (event) {
-                // Just update the mouse position
-                mx = event.pageX;
-                my = event.pageY;
-            });
-            //////////////////////////////////////////////////////////////////////					
-            $mouseTrap.bind('mouseleave', this, function (event) {
-                clearTimeout(controlTimer);
-                //event.data.removeBits();                
-				if(lens) { lens.fadeOut(299); }
-				if($tint) { $tint.fadeOut(299); }
-				if(softFocus) { softFocus.fadeOut(299); }
-				zoomDiv.fadeOut(300, function () {
-                    ctx.fadedOut();
-                });																
-                return false;
-            });
-            //////////////////////////////////////////////////////////////////////			
-            $mouseTrap.bind('mouseenter', this, function (event) {
-				mx = event.pageX;
-                my = event.pageY;
-                zw = event.data;
-                if (zoomDiv) {
-                    zoomDiv.stop(true, false);
-                    zoomDiv.remove();
-                }
-
-                var xPos = opts.adjustX,
-                    yPos = opts.adjustY;
-                             
-                var siw = sImg.outerWidth();
-                var sih = sImg.outerHeight();
-
-                var w = opts.zoomWidth;
-                var h = opts.zoomHeight;
-                if (opts.zoomWidth == 'auto') {
-                    w = siw;
-                }
-                if (opts.zoomHeight == 'auto') {
-                    h = sih;
-                }
-                //$('#info').text( xPos + ' ' + yPos + ' ' + siw + ' ' + sih );
-                var appendTo = jWin.parent(); // attach to the wrapper			
-                switch (opts.position) {
-                case 'top':
-                    yPos -= h; // + opts.adjustY;
-                    break;
-                case 'right':
-                    xPos += siw; // + opts.adjustX;					
-                    break;
-                case 'bottom':
-                    yPos += sih; // + opts.adjustY;
-                    break;
-                case 'left':
-                    xPos -= w; // + opts.adjustX;					
-                    break;
-                case 'inside':
-                    w = siw;
-                    h = sih;
-                    break;
-                    // All other values, try and find an id in the dom to attach to.
-                default:
-                    appendTo = $('#' + opts.position);
-                    // If dom element doesn't exit, just use 'right' position as default.
-                    if (!appendTo.length) {
-                        appendTo = jWin;
-                        xPos += siw; //+ opts.adjustX;
-                        yPos += sih; // + opts.adjustY;	
-                    } else {
-                        w = appendTo.innerWidth();
-                        h = appendTo.innerHeight();
-                    }
-                }
-
-                zoomDiv = appendTo.append(format('<div id="cloud-zoom-big" class="cloud-zoom-big" style="display:none;position:absolute;left:%0px;top:%1px;width:%2px;height:%3px;background-image:url(\'%4\');background-repeat:no-repeat;z-index:99;"></div>', xPos, yPos, w, h, zoomImage.src)).find(':last');
-
-                // Add the title from title tag.
-                if (sImg.attr('title') && opts.showTitle) {
-                    zoomDiv.append(format('<div class="cloud-zoom-title">%0</div>', sImg.attr('title'))).find(':last').css('opacity', opts.titleOpacity);
-                }
-
-                // Fix ie6 select elements wrong z-index bug. Placing an iFrame over the select element solves the issue...		
-                if ($.browser.msie && $.browser.version < 7) {
-                    $ie6Fix = $('<iframe frameborder="0" src="#"></iframe>').css({
-                        position: "absolute",
-                        left: xPos,
-                        top: yPos,
-                        zIndex: 99,
-                        width: w,
-                        height: h
-                    }).insertBefore(zoomDiv);
-                }
-
-                zoomDiv.fadeIn(500);
-
-                if (lens) {
-                    lens.remove();
-                    lens = null;
-                } /* Work out size of cursor */
-                cw = (sImg.outerWidth() / zoomImage.width) * zoomDiv.width();
-                ch = (sImg.outerHeight() / zoomImage.height) * zoomDiv.height();
-
-                // Attach mouse, initially invisible to prevent first frame glitch
-                lens = jWin.append(format("<div class = 'cloud-zoom-lens' style='display:none;z-index:98;position:absolute;width:%0px;height:%1px;'></div>", cw, ch)).find(':last');
-
-                $mouseTrap.css('cursor', lens.css('cursor'));
-
-                var noTrans = false;
-
-                // Init tint layer if needed. (Not relevant if using inside mode)			
-                if (opts.tint) {
-                    lens.css('background', 'url("' + sImg.attr('src') + '")');
-                    $tint = jWin.append(format('<div style="display:none;position:absolute; left:0px; top:0px; width:%0px; height:%1px; background-color:%2;" />', sImg.outerWidth(), sImg.outerHeight(), opts.tint)).find(':last');
-                    $tint.css('opacity', opts.tintOpacity);                    
-					noTrans = true;
-					$tint.fadeIn(500);
-
-                }
-                if (opts.softFocus) {
-                    lens.css('background', 'url("' + sImg.attr('src') + '")');
-                    softFocus = jWin.append(format('<div style="position:absolute;display:none;top:2px; left:2px; width:%0px; height:%1px;" />', sImg.outerWidth() - 2, sImg.outerHeight() - 2, opts.tint)).find(':last');
-                    softFocus.css('background', 'url("' + sImg.attr('src') + '")');
-                    softFocus.css('opacity', 0.5);
-                    noTrans = true;
-                    softFocus.fadeIn(500);
-                }
-
-                if (!noTrans) {
-                    lens.css('opacity', opts.lensOpacity);										
-                }
-				if ( opts.position !== 'inside' ) { lens.fadeIn(500); }
-
-                // Start processing. 
-                zw.controlLoop();
-
-                return; // Don't return false here otherwise opera will not detect change of the mouse pointer type.
-            });
-        };
-
-        img1 = new Image();
-        $(img1).load(function () {
-            ctx.init2(this, 0);
-        });
-        img1.src = sImg.attr('src');
-
-        img2 = new Image();
-        $(img2).load(function () {
-            ctx.init2(this, 1);
-        });
-        img2.src = jWin.attr('href');
-    }
-
-    $.fn.CloudZoom = function (options) {
-        // IE6 background image flicker fix
-        try {
-            document.execCommand("BackgroundImageCache", false, true);
-        } catch (e) {}
-        this.each(function () {
-			var	relOpts, opts;
-			// Hmm...eval...slap on wrist.
-			eval('var	a = {' + $(this).attr('rel') + '}');
-			relOpts = a;
-            if ($(this).is('.cloud-zoom')) {
-                $(this).css({
-                    'position': 'relative',
-                    'display': 'block'
-                });
-                $('img', $(this)).css({
-                    'display': 'block'
-                });
-                // Wrap an outer div around the link so we can attach things without them becoming part of the link.
-                // But not if wrap already exists.
-                if ($(this).parent().attr('id') != 'wrap') {
-                    $(this).wrap('<div id="wrap" style="top:0px;z-index:1;position:relative;"></div>');
-                }
-                opts = $.extend({}, $.fn.CloudZoom.defaults, options);
-                opts = $.extend({}, opts, relOpts);
-                $(this).data('zoom', new CloudZoom($(this), opts));
-
-            } else if ($(this).is('.cloud-zoom-gallery')) {
-                opts = $.extend({}, relOpts, options);
-                $(this).data('relOpts', opts);
-                $(this).bind('click', $(this), function (event) {
-                    var data = event.data.data('relOpts');
-                    // Destroy the previous zoom
-                    $('#' + data.useZoom).data('zoom').destroy();
-                    // Change the biglink to point to the new big image.
-                    $('#' + data.useZoom).attr('href', event.data.attr('href'));
-                    // Change the small image to point to the new small image.
-                    $('#' + data.useZoom + ' img').attr('src', event.data.data('relOpts').smallImage);
-                    // Init a new zoom with the new images.				
-                    $('#' + event.data.data('relOpts').useZoom).CloudZoom();
-                    return false;
-                });
-            }
-        });
-        return this;
-    };
-
-    $.fn.CloudZoom.defaults = {
-        zoomWidth: 'auto',
-        zoomHeight: 'auto',
-        position: 'inside',
-        tint: false,
-        tintOpacity: 0.5,
-        lensOpacity: 0.5,
-        softFocus: false,
-        smoothMove: 3,
-        showTitle: false,
-        titleOpacity: 0.5,
-        adjustX: 0,
-        adjustY: 0
-    };
-
+//////////////////////////////////////////////////////////////////////////////////
+// Cloud Zoom V1.0.2
+// (c) 2010 by R Cecco. <http://www.professorcloud.com>
+// MIT License
+//
+// Please retain this copyright header in all versions of the software
+//////////////////////////////////////////////////////////////////////////////////
+(function ($) {
+
+    $(document).ready(function () {
+        $('.cloud-zoom, .cloud-zoom-gallery').CloudZoom();
+    });
+
+    function format(str) {
+        for (var i = 1; i < arguments.length; i++) {
+            str = str.replace('%' + (i - 1), arguments[i]);
+        }
+        return str;
+    }
+
+    function CloudZoom(jWin, opts) {
+        var sImg = $('img', jWin);
+		var	img1;
+		var	img2;
+        var zoomDiv = null;
+		var	$mouseTrap = null;
+		var	lens = null;
+		var	$tint = null;
+		var	softFocus = null;
+		var	$ie6Fix = null;
+		var	zoomImage;
+        var controlTimer = 0;      
+        var cw, ch;
+        var destU = 0;
+		var	destV = 0;
+        var currV = 0;
+        var currU = 0;      
+        var filesLoaded = 0;
+        var mx,
+            my; 
+        var ctx = this, zw;
+        // Display an image loading message. This message gets deleted when the images have loaded and the zoom init function is called.
+        // We add a small delay before the message is displayed to avoid the message flicking on then off again virtually immediately if the
+        // images load really fast, e.g. from the cache. 
+        //var	ctx = this;
+        setTimeout(function () {
+            //						 <img src="/images/loading.gif"/>
+            if ($mouseTrap === null) {
+                var w = jWin.width();
+                jWin.parent().append(format('<div style="width:%0px;position:absolute;top:75%;left:%1px;text-align:center" class="cloud-zoom-loading" >Loading...</div>', w / 3, (w / 2) - (w / 6))).find(':last').css('opacity', 0.5);
+            }
+        }, 200);
+
+
+        var ie6FixRemove = function () {
+
+            if ($ie6Fix !== null) {
+                $ie6Fix.remove();
+                $ie6Fix = null;
+            }
+        };
+
+        // Removes cursor, tint layer, blur layer etc.
+        this.removeBits = function () {
+            //$mouseTrap.unbind();
+            if (lens) {
+                lens.remove();
+                lens = null;             
+            }
+            if ($tint) {
+                $tint.remove();
+                $tint = null;
+            }
+            if (softFocus) {
+                softFocus.remove();
+                softFocus = null;
+            }
+            ie6FixRemove();
+
+            $('.cloud-zoom-loading', jWin.parent()).remove();
+        };
+
+
+        this.destroy = function () {
+            jWin.data('zoom', null);
+
+            if ($mouseTrap) {
+                $mouseTrap.unbind();
+                $mouseTrap.remove();
+                $mouseTrap = null;
+            }
+            if (zoomDiv) {
+                zoomDiv.remove();
+                zoomDiv = null;
+            }
+            //ie6FixRemove();
+            this.removeBits();
+            // DON'T FORGET TO REMOVE JQUERY 'DATA' VALUES
+        };
+
+
+        // This is called when the zoom window has faded out so it can be removed.
+        this.fadedOut = function () {
+            
+			if (zoomDiv) {
+                zoomDiv.remove();
+                zoomDiv = null;
+            }
+			 this.removeBits();
+            //ie6FixRemove();
+        };
+
+        this.controlLoop = function () {
+            if (lens) {
+                var x = (mx - sImg.offset().left - (cw * 0.5)) >> 0;
+                var y = (my - sImg.offset().top - (ch * 0.5)) >> 0;
+               
+                if (x < 0) {
+                    x = 0;
+                }
+                else if (x > (sImg.outerWidth() - cw)) {
+                    x = (sImg.outerWidth() - cw);
+                }
+                if (y < 0) {
+                    y = 0;
+                }
+                else if (y > (sImg.outerHeight() - ch)) {
+                    y = (sImg.outerHeight() - ch);
+                }
+
+                lens.css({
+                    left: x,
+                    top: y
+                });
+                lens.css('background-position', (-x) + 'px ' + (-y) + 'px');
+
+                destU = (((x) / sImg.outerWidth()) * zoomImage.width) >> 0;
+                destV = (((y) / sImg.outerHeight()) * zoomImage.height) >> 0;
+                currU += (destU - currU) / opts.smoothMove;
+                currV += (destV - currV) / opts.smoothMove;
+
+                zoomDiv.css('background-position', (-(currU >> 0) + 'px ') + (-(currV >> 0) + 'px'));              
+            }
+            controlTimer = setTimeout(function () {
+                ctx.controlLoop();
+            }, 30);
+        };
+
+        this.init2 = function (img, id) {
+
+            filesLoaded++;
+            //console.log(img.src + ' ' + id + ' ' + img.width);	
+            if (id === 1) {
+                zoomImage = img;
+            }
+            //this.images[id] = img;
+            if (filesLoaded === 2) {
+                this.init();
+            }
+        };
+
+        /* Init function start.  */
+        this.init = function () {
+            // Remove loading message (if present);
+            $('.cloud-zoom-loading', jWin.parent()).remove();
+
+
+/* Add a box (mouseTrap) over the small image to trap mouse events.
+		It has priority over zoom window to avoid issues with inner zoom.
+		We need the dummy background image as IE does not trap mouse events on
+		transparent parts of a div.
+		*/
+            $mouseTrap = jWin.parent().append(format("<div class='mousetrap' style='background-image:url(\".\");background-repeat:no-repeat;z-index:999;position:absolute;width:%0px;height:%1px;left:%2px;top:%3px;\'></div>", sImg.outerWidth(), sImg.outerHeight(), 0, 0)).find(':last');
+
+            //////////////////////////////////////////////////////////////////////			
+            /* Do as little as possible in mousemove event to prevent slowdown. */
+            $mouseTrap.bind('mousemove', this, function (event) {
+                // Just update the mouse position
+                mx = event.pageX;
+                my = event.pageY;
+            });
+            //////////////////////////////////////////////////////////////////////					
+            $mouseTrap.bind('mouseleave', this, function (event) {
+                clearTimeout(controlTimer);
+                //event.data.removeBits();                
+				if(lens) { lens.fadeOut(299); }
+				if($tint) { $tint.fadeOut(299); }
+				if(softFocus) { softFocus.fadeOut(299); }
+				zoomDiv.fadeOut(300, function () {
+                    ctx.fadedOut();
+                });																
+                return false;
+            });
+            //////////////////////////////////////////////////////////////////////			
+            $mouseTrap.bind('mouseenter', this, function (event) {
+				mx = event.pageX;
+                my = event.pageY;
+                zw = event.data;
+                if (zoomDiv) {
+                    zoomDiv.stop(true, false);
+                    zoomDiv.remove();
+                }
+
+                var xPos = opts.adjustX,
+                    yPos = opts.adjustY;
+                             
+                var siw = sImg.outerWidth();
+                var sih = sImg.outerHeight();
+
+                var w = opts.zoomWidth;
+                var h = opts.zoomHeight;
+                if (opts.zoomWidth == 'auto') {
+                    w = siw;
+                }
+                if (opts.zoomHeight == 'auto') {
+                    h = sih;
+                }
+                //$('#info').text( xPos + ' ' + yPos + ' ' + siw + ' ' + sih );
+                var appendTo = jWin.parent(); // attach to the wrapper			
+                switch (opts.position) {
+                case 'top':
+                    yPos -= h; // + opts.adjustY;
+                    break;
+                case 'right':
+                    xPos += siw; // + opts.adjustX;					
+                    break;
+                case 'bottom':
+                    yPos += sih; // + opts.adjustY;
+                    break;
+                case 'left':
+                    xPos -= w; // + opts.adjustX;					
+                    break;
+                case 'inside':
+                    w = siw;
+                    h = sih;
+                    break;
+                    // All other values, try and find an id in the dom to attach to.
+                default:
+                    appendTo = $('#' + opts.position);
+                    // If dom element doesn't exit, just use 'right' position as default.
+                    if (!appendTo.length) {
+                        appendTo = jWin;
+                        xPos += siw; //+ opts.adjustX;
+                        yPos += sih; // + opts.adjustY;	
+                    } else {
+                        w = appendTo.innerWidth();
+                        h = appendTo.innerHeight();
+                    }
+                }
+
+                zoomDiv = appendTo.append(format('<div id="cloud-zoom-big" class="cloud-zoom-big" style="display:none;position:absolute;left:%0px;top:%1px;width:%2px;height:%3px;background-image:url(\'%4\');background-repeat:no-repeat;z-index:99;"></div>', xPos, yPos, w, h, zoomImage.src)).find(':last');
+
+                // Add the title from title tag.
+                if (sImg.attr('title') && opts.showTitle) {
+                    zoomDiv.append(format('<div class="cloud-zoom-title">%0</div>', sImg.attr('title'))).find(':last').css('opacity', opts.titleOpacity);
+                }
+
+                // Fix ie6 select elements wrong z-index bug. Placing an iFrame over the select element solves the issue...		
+                if ($.browser.msie && $.browser.version < 7) {
+                    $ie6Fix = $('<iframe frameborder="0" src="#"></iframe>').css({
+                        position: "absolute",
+                        left: xPos,
+                        top: yPos,
+                        zIndex: 99,
+                        width: w,
+                        height: h
+                    }).insertBefore(zoomDiv);
+                }
+
+                zoomDiv.fadeIn(500);
+
+                if (lens) {
+                    lens.remove();
+                    lens = null;
+                } /* Work out size of cursor */
+                cw = (sImg.outerWidth() / zoomImage.width) * zoomDiv.width();
+                ch = (sImg.outerHeight() / zoomImage.height) * zoomDiv.height();
+
+                // Attach mouse, initially invisible to prevent first frame glitch
+                lens = jWin.append(format("<div class = 'cloud-zoom-lens' style='display:none;z-index:98;position:absolute;width:%0px;height:%1px;'></div>", cw, ch)).find(':last');
+
+                $mouseTrap.css('cursor', lens.css('cursor'));
+
+                var noTrans = false;
+
+                // Init tint layer if needed. (Not relevant if using inside mode)			
+                if (opts.tint) {
+                    lens.css('background', 'url("' + sImg.attr('src') + '")');
+                    $tint = jWin.append(format('<div style="display:none;position:absolute; left:0px; top:0px; width:%0px; height:%1px; background-color:%2;" />', sImg.outerWidth(), sImg.outerHeight(), opts.tint)).find(':last');
+                    $tint.css('opacity', opts.tintOpacity);                    
+					noTrans = true;
+					$tint.fadeIn(500);
+
+                }
+                if (opts.softFocus) {
+                    lens.css('background', 'url("' + sImg.attr('src') + '")');
+                    softFocus = jWin.append(format('<div style="position:absolute;display:none;top:2px; left:2px; width:%0px; height:%1px;" />', sImg.outerWidth() - 2, sImg.outerHeight() - 2, opts.tint)).find(':last');
+                    softFocus.css('background', 'url("' + sImg.attr('src') + '")');
+                    softFocus.css('opacity', 0.5);
+                    noTrans = true;
+                    softFocus.fadeIn(500);
+                }
+
+                if (!noTrans) {
+                    lens.css('opacity', opts.lensOpacity);										
+                }
+				if ( opts.position !== 'inside' ) { lens.fadeIn(500); }
+
+                // Start processing. 
+                zw.controlLoop();
+
+                return; // Don't return false here otherwise opera will not detect change of the mouse pointer type.
+            });
+        };
+
+        img1 = new Image();
+        $(img1).load(function () {
+            ctx.init2(this, 0);
+        });
+        img1.src = sImg.attr('src');
+
+        img2 = new Image();
+        $(img2).load(function () {
+            ctx.init2(this, 1);
+        });
+        img2.src = jWin.attr('href');
+    }
+
+    $.fn.CloudZoom = function (options) {
+        // IE6 background image flicker fix
+        try {
+            document.execCommand("BackgroundImageCache", false, true);
+        } catch (e) {}
+        this.each(function () {
+			var	relOpts, opts;
+			// Hmm...eval...slap on wrist.
+			eval('var	a = {' + $(this).attr('rel') + '}');
+			relOpts = a;
+            if ($(this).is('.cloud-zoom')) {
+                $(this).css({
+                    'position': 'relative',
+                    'display': 'block'
+                });
+                $('img', $(this)).css({
+                    'display': 'block'
+                });
+                // Wrap an outer div around the link so we can attach things without them becoming part of the link.
+                // But not if wrap already exists.
+                if ($(this).parent().attr('id') != 'wrap') {
+                    $(this).wrap('<div id="wrap" style="top:0px;z-index:1;position:relative;"></div>');
+                }
+                opts = $.extend({}, $.fn.CloudZoom.defaults, options);
+                opts = $.extend({}, opts, relOpts);
+                $(this).data('zoom', new CloudZoom($(this), opts));
+
+            } else if ($(this).is('.cloud-zoom-gallery')) {
+                opts = $.extend({}, relOpts, options);
+                $(this).data('relOpts', opts);
+                $(this).bind('click', $(this), function (event) {
+                    var data = event.data.data('relOpts');
+                    // Destroy the previous zoom
+                    $('#' + data.useZoom).data('zoom').destroy();
+                    // Change the biglink to point to the new big image.
+                    $('#' + data.useZoom).attr('href', event.data.attr('href'));
+                    // Change the small image to point to the new small image.
+                    $('#' + data.useZoom + ' img').attr('src', event.data.data('relOpts').smallImage);
+                    // Init a new zoom with the new images.				
+                    $('#' + event.data.data('relOpts').useZoom).CloudZoom();
+                    return false;
+                });
+            }
+        });
+        return this;
+    };
+
+    $.fn.CloudZoom.defaults = {
+        zoomWidth: 'auto',
+        zoomHeight: 'auto',
+        position: 'inside',
+        tint: false,
+        tintOpacity: 0.5,
+        lensOpacity: 0.5,
+        softFocus: false,
+        smoothMove: 3,
+        showTitle: false,
+        titleOpacity: 0.5,
+        adjustX: 0,
+        adjustY: 0
+    };
+
 })(jQuery);
\ No newline at end of file
Index: E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/js/banner_scripts_off.js
===================================================================
--- E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/js/banner_scripts_off.js	(revision 8)
+++ E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/js/banner_scripts_off.js	(revision 9)
@@ -1,80 +1,80 @@
-function TopSlider(){
-    var k1=0.5;
-    var k2=0.6;
-    var w0=jQuery(window).width();
-
-    if(w0 < 1200) { w0=1200}
-
-    if(w0 > 1600) { k2=0.55}
-    var w2= w0*k1;
-    var w1= w0*k2;
-    var w3= (w0-jQuery(".container").width())*0.5;
-    var h1=w2/1.9;
-    if(h1 < 235) {h1=235;}
-
-    jQuery("#slider_top").css({"height":h1+"px"});
-    jQuery("#slider_top").css({"width":w0+"px"});
-    jQuery("#carousel1 li").css({"width":w0+"px"});
-    jQuery(".overlap_widget_wrapper").css({"width":w0+"px"});
-    jQuery("#slider_top a.callbacks_nav.next").css({"right":w3+"px","top":h1*0.5-jQuery("#slider_top a.callbacks_nav.next").height()*0.5+"px"});
-    jQuery("#slider_top a.callbacks_nav.prev").css({"left":w3+"px","top":h1*0.5-jQuery("#slider_top a.callbacks_nav.next").height()*0.5+"px"});
-    jQuery("#carousel1 .overlap_widget_wrapper .left_image .title").css({"left":w3+"px"});
-    jQuery("#carousel1 .overlap_widget_wrapper .right_image .title").css({"right":w3+"px"});
-    jQuery(".overlap_widget_wrapper .left_image").css({"width":w1+"px"});
-    jQuery(".overlap_widget_wrapper .left_image .placeholder").css({"width":w2+"px"});
-    jQuery(".overlap_widget_wrapper .right_image").css({"width":w1+"px"});
-    jQuery(".overlap_widget_wrapper .right_image .placeholder").css({"width":w2+"px"});
-    jQuery("#back-top").css({"bottom":jQuery("#footer").height()+150+"px"});
-
-    var is_open = false;
-    var z_index = 0;
-
-    jQuery(".placeholder").mouseenter(function(){
-        is_open = true;
-        jQuery(this).parent().css({"zIndex":"999"});
-        jQuery(this).stop().animate({
-            "width":w1+"px"
-        }, 550, 'easeOutQuad');
-
-    });
-
-    jQuery(".placeholder").mouseleave(function(){
-        is_open = false;
-        z_index++;
-        jQuery(this).parent().css({"zIndex":z_index});
-        jQuery(this).stop().animate({
-            "width":w2+"px"
-        }, 550, 'easeOutQuad');
-    });
-
-};
-
-
-
-jQuery(function() {
-    jQuery('#slider_top a.callbacks_nav').hover(function() {
-            jQuery(this).stop().animate({opacity:1.0},500);
-        },
-        function() {
-            jQuery(this).stop().animate({opacity:0.6},500);
-    });
-
-
-
-    jQuery("#carousel1").responsiveSlides({
-        pager: false,
-        nav: true,
-        speed: 1000,
-        auto: true,
-        timeout: 3600,
-        namespace: "callbacks"
-    });
-    jQuery('#carousel').elastislide({
-        easing		: 'easeInOutQuad',
-        speed		: 1200
-    });
-
-
-});
-
-
+function TopSlider(){
+    var k1=0.5;
+    var k2=0.6;
+    var w0=jQuery(window).width();
+
+    if(w0 < 1200) { w0=1200}
+
+    if(w0 > 1600) { k2=0.55}
+    var w2= w0*k1;
+    var w1= w0*k2;
+    var w3= (w0-jQuery(".container").width())*0.5;
+    var h1=w2/1.9;
+    if(h1 < 235) {h1=235;}
+
+    jQuery("#slider_top").css({"height":h1+"px"});
+    jQuery("#slider_top").css({"width":w0+"px"});
+    jQuery("#carousel1 li").css({"width":w0+"px"});
+    jQuery(".overlap_widget_wrapper").css({"width":w0+"px"});
+    jQuery("#slider_top a.callbacks_nav.next").css({"right":w3+"px","top":h1*0.5-jQuery("#slider_top a.callbacks_nav.next").height()*0.5+"px"});
+    jQuery("#slider_top a.callbacks_nav.prev").css({"left":w3+"px","top":h1*0.5-jQuery("#slider_top a.callbacks_nav.next").height()*0.5+"px"});
+    jQuery("#carousel1 .overlap_widget_wrapper .left_image .title").css({"left":w3+"px"});
+    jQuery("#carousel1 .overlap_widget_wrapper .right_image .title").css({"right":w3+"px"});
+    jQuery(".overlap_widget_wrapper .left_image").css({"width":w1+"px"});
+    jQuery(".overlap_widget_wrapper .left_image .placeholder").css({"width":w2+"px"});
+    jQuery(".overlap_widget_wrapper .right_image").css({"width":w1+"px"});
+    jQuery(".overlap_widget_wrapper .right_image .placeholder").css({"width":w2+"px"});
+    jQuery("#back-top").css({"bottom":jQuery("#footer").height()+150+"px"});
+
+    var is_open = false;
+    var z_index = 0;
+
+    jQuery(".placeholder").mouseenter(function(){
+        is_open = true;
+        jQuery(this).parent().css({"zIndex":"999"});
+        jQuery(this).stop().animate({
+            "width":w1+"px"
+        }, 550, 'easeOutQuad');
+
+    });
+
+    jQuery(".placeholder").mouseleave(function(){
+        is_open = false;
+        z_index++;
+        jQuery(this).parent().css({"zIndex":z_index});
+        jQuery(this).stop().animate({
+            "width":w2+"px"
+        }, 550, 'easeOutQuad');
+    });
+
+};
+
+
+
+jQuery(function() {
+    jQuery('#slider_top a.callbacks_nav').hover(function() {
+            jQuery(this).stop().animate({opacity:1.0},500);
+        },
+        function() {
+            jQuery(this).stop().animate({opacity:0.6},500);
+    });
+
+
+
+    jQuery("#carousel1").responsiveSlides({
+        pager: false,
+        nav: true,
+        speed: 1000,
+        auto: true,
+        timeout: 3600,
+        namespace: "callbacks"
+    });
+    jQuery('#carousel').elastislide({
+        easing		: 'easeInOutQuad',
+        speed		: 1200
+    });
+
+
+});
+
+
Index: E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/js/jquery.jcarousel.min.js
===================================================================
--- E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/js/jquery.jcarousel.min.js	(revision 8)
+++ E:/WebWork/themeforest/theme-Dresscode/oc/svn/trunk/www/catalog/view/theme/dresscode/js/jquery.jcarousel.min.js	(revision 9)
@@ -1,7 +1,7 @@
-/*!
- *
- *   http://sorgalla.com/jcarousel/
- * *
- */
-
-(function(g){var q={vertical:!1,rtl:!1,start:1,offset:1,size:null,scroll:3,visible:null,animation:"normal",easing:"swing",auto:0,wrap:null,initCallback:null,setupCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null,itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,animationStepCallback:null,buttonNextHTML:"<div></div>",buttonPrevHTML:"<div></div>",buttonNextEvent:"click",buttonPrevEvent:"click", buttonNextCallback:null,buttonPrevCallback:null,itemFallbackDimension:null},m=!1;g(window).bind("load.jcarousel",function(){m=!0});g.jcarousel=function(a,c){this.options=g.extend({},q,c||{});this.autoStopped=this.locked=!1;this.buttonPrevState=this.buttonNextState=this.buttonPrev=this.buttonNext=this.list=this.clip=this.container=null;if(!c||c.rtl===void 0)this.options.rtl=(g(a).attr("dir")||g("html").attr("dir")||"").toLowerCase()=="rtl";this.wh=!this.options.vertical?"width":"height";this.lt=!this.options.vertical? this.options.rtl?"right":"left":"top";for(var b="",d=a.className.split(" "),f=0;f<d.length;f++)if(d[f].indexOf("jcarousel-skin")!=-1){g(a).removeClass(d[f]);b=d[f];break}a.nodeName.toUpperCase()=="UL"||a.nodeName.toUpperCase()=="OL"?(this.list=g(a),this.clip=this.list.parents(".jcarousel-clip"),this.container=this.list.parents(".jcarousel-container")):(this.container=g(a),this.list=this.container.find("ul,ol").eq(0),this.clip=this.container.find(".jcarousel-clip"));if(this.clip.size()===0)this.clip= this.list.wrap("<div></div>").parent();if(this.container.size()===0)this.container=this.clip.wrap("<div></div>").parent();b!==""&&this.container.parent()[0].className.indexOf("jcarousel-skin")==-1&&this.container.wrap('<div class=" '+b+'"></div>');this.buttonPrev=g(".jcarousel-prev",this.container);if(this.buttonPrev.size()===0&&this.options.buttonPrevHTML!==null)this.buttonPrev=g(this.options.buttonPrevHTML).appendTo(this.container);this.buttonPrev.addClass(this.className("jcarousel-prev"));this.buttonNext= g(".jcarousel-next",this.container);if(this.buttonNext.size()===0&&this.options.buttonNextHTML!==null)this.buttonNext=g(this.options.buttonNextHTML).appendTo(this.container);this.buttonNext.addClass(this.className("jcarousel-next"));this.clip.addClass(this.className("jcarousel-clip")).css({position:"relative"});this.list.addClass(this.className("jcarousel-list")).css({overflow:"hidden",position:"relative",top:0,margin:0,padding:0}).css(this.options.rtl?"right":"left",0);this.container.addClass(this.className("jcarousel-container")).css({position:"relative"}); !this.options.vertical&&this.options.rtl&&this.container.addClass("jcarousel-direction-rtl").attr("dir","rtl");var j=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible):null,b=this.list.children("li"),e=this;if(b.size()>0){var h=0,i=this.options.offset;b.each(function(){e.format(this,i++);h+=e.dimension(this,j)});this.list.css(this.wh,h+100+"px");if(!c||c.size===void 0)this.options.size=b.size()}this.container.css("display","block");this.buttonNext.css("display","block");this.buttonPrev.css("display", "block");this.funcNext=function(){e.next()};this.funcPrev=function(){e.prev()};this.funcResize=function(){e.resizeTimer&&clearTimeout(e.resizeTimer);e.resizeTimer=setTimeout(function(){e.reload()},100)};this.options.initCallback!==null&&this.options.initCallback(this,"init");!m&&g.browser.safari?(this.buttons(!1,!1),g(window).bind("load.jcarousel",function(){e.setup()})):this.setup()};var f=g.jcarousel;f.fn=f.prototype={jcarousel:"0.2.8"};f.fn.extend=f.extend=g.extend;f.fn.extend({setup:function(){this.prevLast= this.prevFirst=this.last=this.first=null;this.animating=!1;this.tail=this.resizeTimer=this.timer=null;this.inTail=!1;if(!this.locked){this.list.css(this.lt,this.pos(this.options.offset)+"px");var a=this.pos(this.options.start,!0);this.prevFirst=this.prevLast=null;this.animate(a,!1);g(window).unbind("resize.jcarousel",this.funcResize).bind("resize.jcarousel",this.funcResize);this.options.setupCallback!==null&&this.options.setupCallback(this)}},reset:function(){this.list.empty();this.list.css(this.lt, "0px");this.list.css(this.wh,"10px");this.options.initCallback!==null&&this.options.initCallback(this,"reset");this.setup()},reload:function(){this.tail!==null&&this.inTail&&this.list.css(this.lt,f.intval(this.list.css(this.lt))+this.tail);this.tail=null;this.inTail=!1;this.options.reloadCallback!==null&&this.options.reloadCallback(this);if(this.options.visible!==null){var a=this,c=Math.ceil(this.clipping()/this.options.visible),b=0,d=0;this.list.children("li").each(function(f){b+=a.dimension(this, c);f+1<a.first&&(d=b)});this.list.css(this.wh,b+"px");this.list.css(this.lt,-d+"px")}this.scroll(this.first,!1)},lock:function(){this.locked=!0;this.buttons()},unlock:function(){this.locked=!1;this.buttons()},size:function(a){if(a!==void 0)this.options.size=a,this.locked||this.buttons();return this.options.size},has:function(a,c){if(c===void 0||!c)c=a;if(this.options.size!==null&&c>this.options.size)c=this.options.size;for(var b=a;b<=c;b++){var d=this.get(b);if(!d.length||d.hasClass("jcarousel-item-placeholder"))return!1}return!0}, get:function(a){return g(">.jcarousel-item-"+a,this.list)},add:function(a,c){var b=this.get(a),d=0,p=g(c);if(b.length===0)for(var j,e=f.intval(a),b=this.create(a);;){if(j=this.get(--e),e<=0||j.length){e<=0?this.list.prepend(b):j.after(b);break}}else d=this.dimension(b);p.get(0).nodeName.toUpperCase()=="LI"?(b.replaceWith(p),b=p):b.empty().append(c);this.format(b.removeClass(this.className("jcarousel-item-placeholder")),a);p=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible): null;d=this.dimension(b,p)-d;a>0&&a<this.first&&this.list.css(this.lt,f.intval(this.list.css(this.lt))-d+"px");this.list.css(this.wh,f.intval(this.list.css(this.wh))+d+"px");return b},remove:function(a){var c=this.get(a);if(c.length&&!(a>=this.first&&a<=this.last)){var b=this.dimension(c);a<this.first&&this.list.css(this.lt,f.intval(this.list.css(this.lt))+b+"px");c.remove();this.list.css(this.wh,f.intval(this.list.css(this.wh))-b+"px")}},next:function(){this.tail!==null&&!this.inTail?this.scrollTail(!1): this.scroll((this.options.wrap=="both"||this.options.wrap=="last")&&this.options.size!==null&&this.last==this.options.size?1:this.first+this.options.scroll)},prev:function(){this.tail!==null&&this.inTail?this.scrollTail(!0):this.scroll((this.options.wrap=="both"||this.options.wrap=="first")&&this.options.size!==null&&this.first==1?this.options.size:this.first-this.options.scroll)},scrollTail:function(a){if(!this.locked&&!this.animating&&this.tail){this.pauseAuto();var c=f.intval(this.list.css(this.lt)), c=!a?c-this.tail:c+this.tail;this.inTail=!a;this.prevFirst=this.first;this.prevLast=this.last;this.animate(c)}},scroll:function(a,c){!this.locked&&!this.animating&&(this.pauseAuto(),this.animate(this.pos(a),c))},pos:function(a,c){var b=f.intval(this.list.css(this.lt));if(this.locked||this.animating)return b;this.options.wrap!="circular"&&(a=a<1?1:this.options.size&&a>this.options.size?this.options.size:a);for(var d=this.first>a,g=this.options.wrap!="circular"&&this.first<=1?1:this.first,j=d?this.get(g): this.get(this.last),e=d?g:g-1,h=null,i=0,k=!1,l=0;d?--e>=a:++e<a;){h=this.get(e);k=!h.length;if(h.length===0&&(h=this.create(e).addClass(this.className("jcarousel-item-placeholder")),j[d?"before":"after"](h),this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(e<=0||e>this.options.size)))j=this.get(this.index(e)),j.length&&(h=this.add(e,j.clone(!0)));j=h;l=this.dimension(h);k&&(i+=l);if(this.first!==null&&(this.options.wrap=="circular"||e>=1&&(this.options.size===null||e<= this.options.size)))b=d?b+l:b-l}for(var g=this.clipping(),m=[],o=0,n=0,j=this.get(a-1),e=a;++o;){h=this.get(e);k=!h.length;if(h.length===0){h=this.create(e).addClass(this.className("jcarousel-item-placeholder"));if(j.length===0)this.list.prepend(h);else j[d?"before":"after"](h);if(this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(e<=0||e>this.options.size))j=this.get(this.index(e)),j.length&&(h=this.add(e,j.clone(!0)))}j=h;l=this.dimension(h);if(l===0)throw Error("jCarousel: No width/height set for items. This will cause an infinite loop. Aborting..."); this.options.wrap!="circular"&&this.options.size!==null&&e>this.options.size?m.push(h):k&&(i+=l);n+=l;if(n>=g)break;e++}for(h=0;h<m.length;h++)m[h].remove();i>0&&(this.list.css(this.wh,this.dimension(this.list)+i+"px"),d&&(b-=i,this.list.css(this.lt,f.intval(this.list.css(this.lt))-i+"px")));i=a+o-1;if(this.options.wrap!="circular"&&this.options.size&&i>this.options.size)i=this.options.size;if(e>i){o=0;e=i;for(n=0;++o;){h=this.get(e--);if(!h.length)break;n+=this.dimension(h);if(n>=g)break}}e=i-o+ 1;this.options.wrap!="circular"&&e<1&&(e=1);if(this.inTail&&d)b+=this.tail,this.inTail=!1;this.tail=null;if(this.options.wrap!="circular"&&i==this.options.size&&i-o+1>=1&&(d=f.intval(this.get(i).css(!this.options.vertical?"marginRight":"marginBottom")),n-d>g))this.tail=n-g-d;if(c&&a===this.options.size&&this.tail)b-=this.tail,this.inTail=!0;for(;a-- >e;)b+=this.dimension(this.get(a));this.prevFirst=this.first;this.prevLast=this.last;this.first=e;this.last=i;return b},animate:function(a,c){if(!this.locked&& !this.animating){this.animating=!0;var b=this,d=function(){b.animating=!1;a===0&&b.list.css(b.lt,0);!b.autoStopped&&(b.options.wrap=="circular"||b.options.wrap=="both"||b.options.wrap=="last"||b.options.size===null||b.last<b.options.size||b.last==b.options.size&&b.tail!==null&&!b.inTail)&&b.startAuto();b.buttons();b.notify("onAfterAnimation");if(b.options.wrap=="circular"&&b.options.size!==null)for(var c=b.prevFirst;c<=b.prevLast;c++)c!==null&&!(c>=b.first&&c<=b.last)&&(c<1||c>b.options.size)&&b.remove(c)}; this.notify("onBeforeAnimation");if(!this.options.animation||c===!1)this.list.css(this.lt,a+"px"),d();else{var f=!this.options.vertical?this.options.rtl?{right:a}:{left:a}:{top:a},d={duration:this.options.animation,easing:this.options.easing,complete:d};if(g.isFunction(this.options.animationStepCallback))d.step=this.options.animationStepCallback;this.list.animate(f,d)}}},startAuto:function(a){if(a!==void 0)this.options.auto=a;if(this.options.auto===0)return this.stopAuto();if(this.timer===null){this.autoStopped= !1;var c=this;this.timer=window.setTimeout(function(){c.next()},this.options.auto*1E3)}},stopAuto:function(){this.pauseAuto();this.autoStopped=!0},pauseAuto:function(){if(this.timer!==null)window.clearTimeout(this.timer),this.timer=null},buttons:function(a,c){if(a==null&&(a=!this.locked&&this.options.size!==0&&(this.options.wrap&&this.options.wrap!="first"||this.options.size===null||this.last<this.options.size),!this.locked&&(!this.options.wrap||this.options.wrap=="first")&&this.options.size!==null&& this.last>=this.options.size))a=this.tail!==null&&!this.inTail;if(c==null&&(c=!this.locked&&this.options.size!==0&&(this.options.wrap&&this.options.wrap!="last"||this.first>1),!this.locked&&(!this.options.wrap||this.options.wrap=="last")&&this.options.size!==null&&this.first==1))c=this.tail!==null&&this.inTail;var b=this;this.buttonNext.size()>0?(this.buttonNext.unbind(this.options.buttonNextEvent+".jcarousel",this.funcNext),a&&this.buttonNext.bind(this.options.buttonNextEvent+".jcarousel",this.funcNext), this.buttonNext[a?"removeClass":"addClass"](this.className("jcarousel-next-disabled")).attr("disabled",a?!1:!0),this.options.buttonNextCallback!==null&&this.buttonNext.data("jcarouselstate")!=a&&this.buttonNext.each(function(){b.options.buttonNextCallback(b,this,a)}).data("jcarouselstate",a)):this.options.buttonNextCallback!==null&&this.buttonNextState!=a&&this.options.buttonNextCallback(b,null,a);this.buttonPrev.size()>0?(this.buttonPrev.unbind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev), c&&this.buttonPrev.bind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev),this.buttonPrev[c?"removeClass":"addClass"](this.className("jcarousel-prev-disabled")).attr("disabled",c?!1:!0),this.options.buttonPrevCallback!==null&&this.buttonPrev.data("jcarouselstate")!=c&&this.buttonPrev.each(function(){b.options.buttonPrevCallback(b,this,c)}).data("jcarouselstate",c)):this.options.buttonPrevCallback!==null&&this.buttonPrevState!=c&&this.options.buttonPrevCallback(b,null,c);this.buttonNextState= a;this.buttonPrevState=c},notify:function(a){var c=this.prevFirst===null?"init":this.prevFirst<this.first?"next":"prev";this.callback("itemLoadCallback",a,c);this.prevFirst!==this.first&&(this.callback("itemFirstInCallback",a,c,this.first),this.callback("itemFirstOutCallback",a,c,this.prevFirst));this.prevLast!==this.last&&(this.callback("itemLastInCallback",a,c,this.last),this.callback("itemLastOutCallback",a,c,this.prevLast));this.callback("itemVisibleInCallback",a,c,this.first,this.last,this.prevFirst, this.prevLast);this.callback("itemVisibleOutCallback",a,c,this.prevFirst,this.prevLast,this.first,this.last)},callback:function(a,c,b,d,f,j,e){if(!(this.options[a]==null||typeof this.options[a]!="object"&&c!="onAfterAnimation")){var h=typeof this.options[a]=="object"?this.options[a][c]:this.options[a];if(g.isFunction(h)){var i=this;if(d===void 0)h(i,b,c);else if(f===void 0)this.get(d).each(function(){h(i,this,d,b,c)});else for(var a=function(a){i.get(a).each(function(){h(i,this,a,b,c)})},k=d;k<=f;k++)k!== null&&!(k>=j&&k<=e)&&a(k)}}},create:function(a){return this.format("<li></li>",a)},format:function(a,c){for(var a=g(a),b=a.get(0).className.split(" "),d=0;d<b.length;d++)b[d].indexOf("jcarousel-")!=-1&&a.removeClass(b[d]);a.addClass(this.className("jcarousel-item")).addClass(this.className("jcarousel-item-"+c)).css({"float":this.options.rtl?"right":"left","list-style":"none"}).attr("jcarouselindex",c);return a},className:function(a){return a+" "+a+(!this.options.vertical?"-horizontal":"-vertical")}, dimension:function(a,c){var b=g(a);if(c==null)return!this.options.vertical?b.outerWidth(!0)||f.intval(this.options.itemFallbackDimension):b.outerHeight(!0)||f.intval(this.options.itemFallbackDimension);else{var d=!this.options.vertical?c-f.intval(b.css("marginLeft"))-f.intval(b.css("marginRight")):c-f.intval(b.css("marginTop"))-f.intval(b.css("marginBottom"));g(b).css(this.wh,d+"px");return this.dimension(b)}},clipping:function(){return!this.options.vertical?this.clip[0].offsetWidth-f.intval(this.clip.css("borderLeftWidth"))- f.intval(this.clip.css("borderRightWidth")):this.clip[0].offsetHeight-f.intval(this.clip.css("borderTopWidth"))-f.intval(this.clip.css("borderBottomWidth"))},index:function(a,c){if(c==null)c=this.options.size;return Math.round(((a-1)/c-Math.floor((a-1)/c))*c)+1}});f.extend({defaults:function(a){return g.extend(q,a||{})},intval:function(a){a=parseInt(a,10);return isNaN(a)?0:a},windowLoaded:function(){m=!0}});g.fn.jcarousel=function(a){if(typeof a=="string"){var c=g(this).data("jcarousel"),b=Array.prototype.slice.call(arguments, 1);return c[a].apply(c,b)}else return this.each(function(){var b=g(this).data("jcarousel");b?(a&&g.extend(b.options,a),b.reload()):g(this).data("jcarousel",new f(this,a))})}})(jQuery);
+/*!
+ *
+ *   http://sorgalla.com/jcarousel/
+ * *
+ */
+
+(function(g){var q={vertical:!1,rtl:!1,start:1,offset:1,size:null,scroll:3,visible:null,animation:"normal",easing:"swing",auto:0,wrap:null,initCallback:null,setupCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null,itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,animationStepCallback:null,buttonNextHTML:"<div></div>",buttonPrevHTML:"<div></div>",buttonNextEvent:"click",buttonPrevEvent:"click", buttonNextCallback:null,buttonPrevCallback:null,itemFallbackDimension:null},m=!1;g(window).bind("load.jcarousel",function(){m=!0});g.jcarousel=function(a,c){this.options=g.extend({},q,c||{});this.autoStopped=this.locked=!1;this.buttonPrevState=this.buttonNextState=this.buttonPrev=this.buttonNext=this.list=this.clip=this.container=null;if(!c||c.rtl===void 0)this.options.rtl=(g(a).attr("dir")||g("html").attr("dir")||"").toLowerCase()=="rtl";this.wh=!this.options.vertical?"width":"height";this.lt=!this.options.vertical? this.options.rtl?"right":"left":"top";for(var b="",d=a.className.split(" "),f=0;f<d.length;f++)if(d[f].indexOf("jcarousel-skin")!=-1){g(a).removeClass(d[f]);b=d[f];break}a.nodeName.toUpperCase()=="UL"||a.nodeName.toUpperCase()=="OL"?(this.list=g(a),this.clip=this.list.parents(".jcarousel-clip"),this.container=this.list.parents(".jcarousel-container")):(this.container=g(a),this.list=this.container.find("ul,ol").eq(0),this.clip=this.container.find(".jcarousel-clip"));if(this.clip.size()===0)this.clip= this.list.wrap("<div></div>").parent();if(this.container.size()===0)this.container=this.clip.wrap("<div></div>").parent();b!==""&&this.container.parent()[0].className.indexOf("jcarousel-skin")==-1&&this.container.wrap('<div class=" '+b+'"></div>');this.buttonPrev=g(".jcarousel-prev",this.container);if(this.buttonPrev.size()===0&&this.options.buttonPrevHTML!==null)this.buttonPrev=g(this.options.buttonPrevHTML).appendTo(this.container);this.buttonPrev.addClass(this.className("jcarousel-prev"));this.buttonNext= g(".jcarousel-next",this.container);if(this.buttonNext.size()===0&&this.options.buttonNextHTML!==null)this.buttonNext=g(this.options.buttonNextHTML).appendTo(this.container);this.buttonNext.addClass(this.className("jcarousel-next"));this.clip.addClass(this.className("jcarousel-clip")).css({position:"relative"});this.list.addClass(this.className("jcarousel-list")).css({overflow:"hidden",position:"relative",top:0,margin:0,padding:0}).css(this.options.rtl?"right":"left",0);this.container.addClass(this.className("jcarousel-container")).css({position:"relative"}); !this.options.vertical&&this.options.rtl&&this.container.addClass("jcarousel-direction-rtl").attr("dir","rtl");var j=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible):null,b=this.list.children("li"),e=this;if(b.size()>0){var h=0,i=this.options.offset;b.each(function(){e.format(this,i++);h+=e.dimension(this,j)});this.list.css(this.wh,h+100+"px");if(!c||c.size===void 0)this.options.size=b.size()}this.container.css("display","block");this.buttonNext.css("display","block");this.buttonPrev.css("display", "block");this.funcNext=function(){e.next()};this.funcPrev=function(){e.prev()};this.funcResize=function(){e.resizeTimer&&clearTimeout(e.resizeTimer);e.resizeTimer=setTimeout(function(){e.reload()},100)};this.options.initCallback!==null&&this.options.initCallback(this,"init");!m&&g.browser.safari?(this.buttons(!1,!1),g(window).bind("load.jcarousel",function(){e.setup()})):this.setup()};var f=g.jcarousel;f.fn=f.prototype={jcarousel:"0.2.8"};f.fn.extend=f.extend=g.extend;f.fn.extend({setup:function(){this.prevLast= this.prevFirst=this.last=this.first=null;this.animating=!1;this.tail=this.resizeTimer=this.timer=null;this.inTail=!1;if(!this.locked){this.list.css(this.lt,this.pos(this.options.offset)+"px");var a=this.pos(this.options.start,!0);this.prevFirst=this.prevLast=null;this.animate(a,!1);g(window).unbind("resize.jcarousel",this.funcResize).bind("resize.jcarousel",this.funcResize);this.options.setupCallback!==null&&this.options.setupCallback(this)}},reset:function(){this.list.empty();this.list.css(this.lt, "0px");this.list.css(this.wh,"10px");this.options.initCallback!==null&&this.options.initCallback(this,"reset");this.setup()},reload:function(){this.tail!==null&&this.inTail&&this.list.css(this.lt,f.intval(this.list.css(this.lt))+this.tail);this.tail=null;this.inTail=!1;this.options.reloadCallback!==null&&this.options.reloadCallback(this);if(this.options.visible!==null){var a=this,c=Math.ceil(this.clipping()/this.options.visible),b=0,d=0;this.list.children("li").each(function(f){b+=a.dimension(this, c);f+1<a.first&&(d=b)});this.list.css(this.wh,b+"px");this.list.css(this.lt,-d+"px")}this.scroll(this.first,!1)},lock:function(){this.locked=!0;this.buttons()},unlock:function(){this.locked=!1;this.buttons()},size:function(a){if(a!==void 0)this.options.size=a,this.locked||this.buttons();return this.options.size},has:function(a,c){if(c===void 0||!c)c=a;if(this.options.size!==null&&c>this.options.size)c=this.options.size;for(var b=a;b<=c;b++){var d=this.get(b);if(!d.length||d.hasClass("jcarousel-item-placeholder"))return!1}return!0}, get:function(a){return g(">.jcarousel-item-"+a,this.list)},add:function(a,c){var b=this.get(a),d=0,p=g(c);if(b.length===0)for(var j,e=f.intval(a),b=this.create(a);;){if(j=this.get(--e),e<=0||j.length){e<=0?this.list.prepend(b):j.after(b);break}}else d=this.dimension(b);p.get(0).nodeName.toUpperCase()=="LI"?(b.replaceWith(p),b=p):b.empty().append(c);this.format(b.removeClass(this.className("jcarousel-item-placeholder")),a);p=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible): null;d=this.dimension(b,p)-d;a>0&&a<this.first&&this.list.css(this.lt,f.intval(this.list.css(this.lt))-d+"px");this.list.css(this.wh,f.intval(this.list.css(this.wh))+d+"px");return b},remove:function(a){var c=this.get(a);if(c.length&&!(a>=this.first&&a<=this.last)){var b=this.dimension(c);a<this.first&&this.list.css(this.lt,f.intval(this.list.css(this.lt))+b+"px");c.remove();this.list.css(this.wh,f.intval(this.list.css(this.wh))-b+"px")}},next:function(){this.tail!==null&&!this.inTail?this.scrollTail(!1): this.scroll((this.options.wrap=="both"||this.options.wrap=="last")&&this.options.size!==null&&this.last==this.options.size?1:this.first+this.options.scroll)},prev:function(){this.tail!==null&&this.inTail?this.scrollTail(!0):this.scroll((this.options.wrap=="both"||this.options.wrap=="first")&&this.options.size!==null&&this.first==1?this.options.size:this.first-this.options.scroll)},scrollTail:function(a){if(!this.locked&&!this.animating&&this.tail){this.pauseAuto();var c=f.intval(this.list.css(this.lt)), c=!a?c-this.tail:c+this.tail;this.inTail=!a;this.prevFirst=this.first;this.prevLast=this.last;this.animate(c)}},scroll:function(a,c){!this.locked&&!this.animating&&(this.pauseAuto(),this.animate(this.pos(a),c))},pos:function(a,c){var b=f.intval(this.list.css(this.lt));if(this.locked||this.animating)return b;this.options.wrap!="circular"&&(a=a<1?1:this.options.size&&a>this.options.size?this.options.size:a);for(var d=this.first>a,g=this.options.wrap!="circular"&&this.first<=1?1:this.first,j=d?this.get(g): this.get(this.last),e=d?g:g-1,h=null,i=0,k=!1,l=0;d?--e>=a:++e<a;){h=this.get(e);k=!h.length;if(h.length===0&&(h=this.create(e).addClass(this.className("jcarousel-item-placeholder")),j[d?"before":"after"](h),this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(e<=0||e>this.options.size)))j=this.get(this.index(e)),j.length&&(h=this.add(e,j.clone(!0)));j=h;l=this.dimension(h);k&&(i+=l);if(this.first!==null&&(this.options.wrap=="circular"||e>=1&&(this.options.size===null||e<= this.options.size)))b=d?b+l:b-l}for(var g=this.clipping(),m=[],o=0,n=0,j=this.get(a-1),e=a;++o;){h=this.get(e);k=!h.length;if(h.length===0){h=this.create(e).addClass(this.className("jcarousel-item-placeholder"));if(j.length===0)this.list.prepend(h);else j[d?"before":"after"](h);if(this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(e<=0||e>this.options.size))j=this.get(this.index(e)),j.length&&(h=this.add(e,j.clone(!0)))}j=h;l=this.dimension(h);if(l===0)throw Error("jCarousel: No width/height set for items. This will cause an infinite loop. Aborting..."); this.options.wrap!="circular"&&this.options.size!==null&&e>this.options.size?m.push(h):k&&(i+=l);n+=l;if(n>=g)break;e++}for(h=0;h<m.length;h++)m[h].remove();i>0&&(this.list.css(this.wh,this.dimension(this.list)+i+"px"),d&&(b-=i,this.list.css(this.lt,f.intval(this.list.css(this.lt))-i+"px")));i=a+o-1;if(this.options.wrap!="circular"&&this.options.size&&i>this.options.size)i=this.options.size;if(e>i){o=0;e=i;for(n=0;++o;){h=this.get(e--);if(!h.length)break;n+=this.dimension(h);if(n>=g)break}}e=i-o+ 1;this.options.wrap!="circular"&&e<1&&(e=1);if(this.inTail&&d)b+=this.tail,this.inTail=!1;this.tail=null;if(this.options.wrap!="circular"&&i==this.options.size&&i-o+1>=1&&(d=f.intval(this.get(i).css(!this.options.vertical?"marginRight":"marginBottom")),n-d>g))this.tail=n-g-d;if(c&&a===this.options.size&&this.tail)b-=this.tail,this.inTail=!0;for(;a-- >e;)b+=this.dimension(this.get(a));this.prevFirst=this.first;this.prevLast=this.last;this.first=e;this.last=i;return b},animate:function(a,c){if(!this.locked&& !this.animating){this.animating=!0;var b=this,d=function(){b.animating=!1;a===0&&b.list.css(b.lt,0);!b.autoStopped&&(b.options.wrap=="circular"||b.options.wrap=="both"||b.options.wrap=="last"||b.options.size===null||b.last<b.options.size||b.last==b.options.size&&b.tail!==null&&!b.inTail)&&b.startAuto();b.buttons();b.notify("onAfterAnimation");if(b.options.wrap=="circular"&&b.options.size!==null)for(var c=b.prevFirst;c<=b.prevLast;c++)c!==null&&!(c>=b.first&&c<=b.last)&&(c<1||c>b.options.size)&&b.remove(c)}; this.notify("onBeforeAnimation");if(!this.options.animation||c===!1)this.list.css(this.lt,a+"px"),d();else{var f=!this.options.vertical?this.options.rtl?{right:a}:{left:a}:{top:a},d={duration:this.options.animation,easing:this.options.easing,complete:d};if(g.isFunction(this.options.animationStepCallback))d.step=this.options.animationStepCallback;this.list.animate(f,d)}}},startAuto:function(a){if(a!==void 0)this.options.auto=a;if(this.options.auto===0)return this.stopAuto();if(this.timer===null){this.autoStopped= !1;var c=this;this.timer=window.setTimeout(function(){c.next()},this.options.auto*1E3)}},stopAuto:function(){this.pauseAuto();this.autoStopped=!0},pauseAuto:function(){if(this.timer!==null)window.clearTimeout(this.timer),this.timer=null},buttons:function(a,c){if(a==null&&(a=!this.locked&&this.options.size!==0&&(this.options.wrap&&this.options.wrap!="first"||this.options.size===null||this.last<this.options.size),!this.locked&&(!this.options.wrap||this.options.wrap=="first")&&this.options.size!==null&& this.last>=this.options.size))a=this.tail!==null&&!this.inTail;if(c==null&&(c=!this.locked&&this.options.size!==0&&(this.options.wrap&&this.options.wrap!="last"||this.first>1),!this.locked&&(!this.options.wrap||this.options.wrap=="last")&&this.options.size!==null&&this.first==1))c=this.tail!==null&&this.inTail;var b=this;this.buttonNext.size()>0?(this.buttonNext.unbind(this.options.buttonNextEvent+".jcarousel",this.funcNext),a&&this.buttonNext.bind(this.options.buttonNextEvent+".jcarousel",this.funcNext), this.buttonNext[a?"removeClass":"addClass"](this.className("jcarousel-next-disabled")).attr("disabled",a?!1:!0),this.options.buttonNextCallback!==null&&this.buttonNext.data("jcarouselstate")!=a&&this.buttonNext.each(function(){b.options.buttonNextCallback(b,this,a)}).data("jcarouselstate",a)):this.options.buttonNextCallback!==null&&this.buttonNextState!=a&&this.options.buttonNextCallback(b,null,a);this.buttonPrev.size()>0?(this.buttonPrev.unbind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev), c&&this.buttonPrev.bind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev),this.buttonPrev[c?"removeClass":"addClass"](this.className("jcarousel-prev-disabled")).attr("disabled",c?!1:!0),this.options.buttonPrevCallback!==null&&this.buttonPrev.data("jcarouselstate")!=c&&this.buttonPrev.each(function(){b.options.buttonPrevCallback(b,this,c)}).data("jcarouselstate",c)):this.options.buttonPrevCallback!==null&&this.buttonPrevState!=c&&this.options.buttonPrevCallback(b,null,c);this.buttonNextState= a;this.buttonPrevState=c},notify:function(a){var c=this.prevFirst===null?"init":this.prevFirst<this.first?"next":"prev";this.callback("itemLoadCallback",a,c);this.prevFirst!==this.first&&(this.callback("itemFirstInCallback",a,c,this.first),this.callback("itemFirstOutCallback",a,c,this.prevFirst));this.prevLast!==this.last&&(this.callback("itemLastInCallback",a,c,this.last),this.callback("itemLastOutCallback",a,c,this.prevLast));this.callback("itemVisibleInCallback",a,c,this.first,this.last,this.prevFirst, this.prevLast);this.callback("itemVisibleOutCallback",a,c,this.prevFirst,this.prevLast,this.first,this.last)},callback:function(a,c,b,d,f,j,e){if(!(this.options[a]==null||typeof this.options[a]!="object"&&c!="onAfterAnimation")){var h=typeof this.options[a]=="object"?this.options[a][c]:this.options[a];if(g.isFunction(h)){var i=this;if(d===void 0)h(i,b,c);else if(f===void 0)this.get(d).each(function(){h(i,this,d,b,c)});else for(var a=function(a){i.get(a).each(function(){h(i,this,a,b,c)})},k=d;k<=f;k++)k!== null&&!(k>=j&&k<=e)&&a(k)}}},create:function(a){return this.format("<li></li>",a)},format:function(a,c){for(var a=g(a),b=a.get(0).className.split(" "),d=0;d<b.length;d++)b[d].indexOf("jcarousel-")!=-1&&a.removeClass(b[d]);a.addClass(this.className("jcarousel-item")).addClass(this.className("jcarousel-item-"+c)).css({"float":this.options.rtl?"right":"left","list-style":"none"}).attr("jcarouselindex",c);return a},className:function(a){return a+" "+a+(!this.options.vertical?"-horizontal":"-vertical")}, dimension:function(a,c){var b=g(a);if(c==null)return!this.options.vertical?b.outerWidth(!0)||f.intval(this.options.itemFallbackDimension):b.outerHeight(!0)||f.intval(this.options.itemFallbackDimension);else{var d=!this.options.vertical?c-f.intval(b.css("marginLeft"))-f.intval(b.css("marginRight")):c-f.intval(b.css("marginTop"))-f.intval(b.css("marginBottom"));g(b).css(this.wh,d+"px");return this.dimension(b)}},clipping:function(){return!this.options.vertical?this.clip[0].offsetWidth-f.intval(this.clip.css("borderLeftWidth"))- f.intval(this.clip.css("borderRightWidth")):this.clip[0].offsetHeight-f.intval(this.clip.css("borderTopWidth"))-f.intval(this.clip.css("borderBottomWidth"))},index:function(a,c){if(c==null)c=this.options.size;return Math.round(((a-1)/c-Math.floor((a-1)/c))*c)+1}});f.extend({defaults:function(a){return g.extend(q,a||{})},intval:function(a){a=parseInt(a,10);return isNaN(a)?0:a},windowLoaded:function(){m=!0}});g.fn.jcarousel=function(a){if(typeof a=="string"){var c=g(this).data("jcarousel"),b=Array.prototype.slice.call(arguments, 1);return c[a].apply(c,b)}else return this.each(function(){var b=g(this).data("jcarousel");b?(a&&g.extend(b.options,a),b.reload()):g(this).data("jcarousel",new f(this,a))})}})(jQuery);
